Adds pop-up box that informs the owner/admin that their names will be made visible to everyone when openly publishing the DMP/ Dataset Desrciption. (Issue #186)
This commit is contained in:
parent
f1070196a0
commit
8d343caf91
|
@ -2,17 +2,20 @@ import { CommonModule } from '@angular/common';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { MaterialModule } from '../material/material.module';
|
import { MaterialModule } from '../material/material.module';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
TranslateModule
|
TranslateModule,
|
||||||
|
FormsModule
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
TranslateModule
|
TranslateModule,
|
||||||
|
FormsModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class CommonUiModule { }
|
export class CommonUiModule { }
|
||||||
|
|
|
@ -3,25 +3,29 @@
|
||||||
<div class="col-auto close-btn justify-content-start">
|
<div class="col-auto close-btn justify-content-start">
|
||||||
<mat-icon color="warn">{{ data.icon }}</mat-icon>
|
<mat-icon color="warn">{{ data.icon }}</mat-icon>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="data.warning" class="col justify-content-center warn-text">
|
<div *ngIf="data.warning" class="col justify-content-center warn-text">{{ data.warning }}</div>
|
||||||
{{ data.warning }}
|
|
||||||
</div>
|
|
||||||
<div class="col-auto close-btn justify-content-end" (click)="close()">
|
<div class="col-auto close-btn justify-content-end" (click)="close()">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row d-flex flex-row">
|
<div class="row d-flex flex-row">
|
||||||
<div class="col confirmation-message">
|
<div class="col message">{{ data.message }}</div>
|
||||||
{{ data.message }}
|
|
||||||
</div>
|
|
||||||
<div *ngIf="!data.icon" class="col-auto close-btn justify-content-end" (click)="close()">
|
<div *ngIf="!data.icon" class="col-auto close-btn justify-content-end" (click)="close()">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="data.privacyPolicyNames" class="row d-flex flex-col">
|
||||||
|
<div class="col privacy-policy-names">{{ data.privacyPolicyNames }}</div>
|
||||||
|
<mat-checkbox [(ngModel)]="agreePrivacyPolicyNames" required class="checkbox-privacy">
|
||||||
|
{{'GENERAL.CONFIRMATION-DIALOG.ACTIONS.POLICY-AGREE' | translate}}
|
||||||
|
</mat-checkbox>
|
||||||
|
<div *ngIf="!agreePrivacyPolicyNames" class="required-policy">{{'GENERAL.CONFIRMATION-DIALOG.ACTIONS.REQUIRED' | translate}}</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
<div class="col-auto"><button mat-raised-button type="button" (click)="cancel()" class="cancel">{{ data.cancelButton }}</button></div>
|
<div class="col-auto"><button mat-raised-button type="button" (click)="cancel()">{{ data.cancelButton }}</button></div>
|
||||||
<div *ngIf="data.isDeleteConfirmation" class="col-auto"><button mat-raised-button type="button" (click)="confirm()" class="delete">{{ data.confirmButton }}</button></div>
|
<div *ngIf="data.isDeleteConfirmation" class="col-auto"><button mat-raised-button type="button" (click)="confirm()" class="delete">{{ data.confirmButton }}</button></div>
|
||||||
<div *ngIf="!data.isDeleteConfirmation" class="col-auto"><button mat-raised-button type="button" (click)="confirm()" class="confirm">{{ data.confirmButton }}</button></div>
|
<div *ngIf="!data.isDeleteConfirmation && !data.privacyPolicyNames" class="col-auto"><button mat-raised-button type="button" (click)="confirm()" color="accent">{{ data.confirmButton }}</button></div>
|
||||||
|
<div *ngIf="!data.isDeleteConfirmation && data.privacyPolicyNames" class="col-auto"><button mat-raised-button type="button" [disabled]="!agreePrivacyPolicyNames" (click)="confirm()" color="accent">{{ data.confirmButton }}</button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,30 +1,44 @@
|
||||||
.confirmation-dialog {
|
.confirmation-dialog {
|
||||||
.confirmation-message {
|
.confirmation {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-btn {
|
.privacy-policy-names {
|
||||||
margin-left: auto;
|
font-weight: 700;
|
||||||
cursor: pointer;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.warn-text {
|
.close-btn {
|
||||||
color: #f44336;
|
margin-left: auto;
|
||||||
}
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.cancel {
|
.warn-text {
|
||||||
background-color: #aaaaaa;
|
color: #f44336;
|
||||||
color: #ffffff;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.confirm {
|
.cancel {
|
||||||
background-color: #2cba6c;
|
background-color: #aaaaaa;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete {
|
.confirm {
|
||||||
background-color: #ba2c2c;
|
background-color: #2cba6c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.delete {
|
||||||
|
background-color: #ba2c2c;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-privacy {
|
||||||
|
padding: 0em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.required-policy {
|
||||||
|
padding: 0em 1.2em 1em;
|
||||||
|
font-size: smaller;
|
||||||
|
color: #f44336;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
})
|
})
|
||||||
export class ConfirmationDialogComponent {
|
export class ConfirmationDialogComponent {
|
||||||
|
|
||||||
|
agreePrivacyPolicyNames = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
|
public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
|
|
|
@ -293,6 +293,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
restoreFocus: false,
|
restoreFocus: false,
|
||||||
data: {
|
data: {
|
||||||
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'),
|
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'),
|
||||||
|
privacyPolicyNames: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PRIVACY-POLICY-NAMES'),
|
||||||
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
|
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
|
||||||
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
|
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
|
||||||
isDeleteConfirmation: false
|
isDeleteConfirmation: false
|
||||||
|
|
|
@ -43,13 +43,16 @@
|
||||||
"ZENODO-DOI": "Would you like to create digital object identifier (DOI) for the DMP?",
|
"ZENODO-DOI": "Would you like to create digital object identifier (DOI) for the DMP?",
|
||||||
"LEAVE-PAGE": "If you leave, your changes will be lost.",
|
"LEAVE-PAGE": "If you leave, your changes will be lost.",
|
||||||
"LEAVE-WARNING": "You have unsaved changes!",
|
"LEAVE-WARNING": "You have unsaved changes!",
|
||||||
|
"PRIVACY-POLICY-NAMES": "The names of all people involved into this DMP will be publicly visible. Do you agree with that?",
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"CONFIRM": "Yes",
|
"CONFIRM": "Yes",
|
||||||
"NO": "No",
|
"NO": "No",
|
||||||
"DELETE": "Delete",
|
"DELETE": "Delete",
|
||||||
"REMOVE": "Remove",
|
"REMOVE": "Remove",
|
||||||
"CANCEL": "Cancel",
|
"CANCEL": "Cancel",
|
||||||
"LEAVE": "Leave"
|
"LEAVE": "Leave",
|
||||||
|
"POLICY-AGREE": "Make names publicly visible.",
|
||||||
|
"REQUIRED": "Click on checkbox is required."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"NOTIFICATION-DIALOG": {
|
"NOTIFICATION-DIALOG": {
|
||||||
|
|
Loading…
Reference in New Issue