From 8d343caf91450aa46d6a14601abd38e85c2d65f5 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Wed, 9 Oct 2019 11:45:47 +0300 Subject: [PATCH] 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) --- .../src/app/common/ui/common-ui.module.ts | 7 ++- .../confirmation-dialog.component.html | 20 ++++--- .../confirmation-dialog.component.scss | 58 ++++++++++++------- .../confirmation-dialog.component.ts | 2 + .../ui/dmp/overview/dmp-overview.component.ts | 1 + dmp-frontend/src/assets/i18n/en.json | 5 +- 6 files changed, 60 insertions(+), 33 deletions(-) diff --git a/dmp-frontend/src/app/common/ui/common-ui.module.ts b/dmp-frontend/src/app/common/ui/common-ui.module.ts index 124c9957a..fe8455d39 100644 --- a/dmp-frontend/src/app/common/ui/common-ui.module.ts +++ b/dmp-frontend/src/app/common/ui/common-ui.module.ts @@ -2,17 +2,20 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; import { MaterialModule } from '../material/material.module'; +import { FormsModule } from '@angular/forms'; @NgModule({ imports: [ CommonModule, MaterialModule, - TranslateModule + TranslateModule, + FormsModule ], exports: [ CommonModule, MaterialModule, - TranslateModule + TranslateModule, + FormsModule ] }) export class CommonUiModule { } diff --git a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html index 9acd1822d..e8f995e67 100644 --- a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html +++ b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html @@ -3,25 +3,29 @@
{{ data.icon }}
-
- {{ data.warning }} -
+
{{ data.warning }}
close
-
- {{ data.message }} -
+
{{ data.message }}
close
+
+
{{ data.privacyPolicyNames }}
+ + {{'GENERAL.CONFIRMATION-DIALOG.ACTIONS.POLICY-AGREE' | translate}} + +
{{'GENERAL.CONFIRMATION-DIALOG.ACTIONS.REQUIRED' | translate}}
+
-
+
-
+
+
diff --git a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss index 565cad324..025bfb9d5 100644 --- a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss +++ b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss @@ -1,30 +1,44 @@ .confirmation-dialog { - .confirmation-message { - padding-bottom: 20px; - } + .confirmation { + padding-bottom: 20px; + } - .close-btn { - margin-left: auto; - cursor: pointer; - } + .privacy-policy-names { + font-weight: 700; + padding: 1em; + } - .warn-text { - color: #f44336; - } + .close-btn { + margin-left: auto; + cursor: pointer; + } - .cancel { - background-color: #aaaaaa; - color: #ffffff; - } + .warn-text { + color: #f44336; + } - .confirm { - background-color: #2cba6c; - color: #ffffff; - } + .cancel { + background-color: #aaaaaa; + color: #ffffff; + } - .delete { - background-color: #ba2c2c; - color: #ffffff; - } + .confirm { + background-color: #2cba6c; + 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; + } } diff --git a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts index 55b8ddf8c..cfb0f0b40 100644 --- a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts +++ b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts @@ -8,6 +8,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; }) export class ConfirmationDialogComponent { + agreePrivacyPolicyNames = false; + constructor( public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index de98724b3..6b7e90baf 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -293,6 +293,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { restoreFocus: false, data: { 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'), cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'), isDeleteConfirmation: false diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 837a4d8f2..a1becbb90 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -43,13 +43,16 @@ "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-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": { "CONFIRM": "Yes", "NO": "No", "DELETE": "Delete", "REMOVE": "Remove", "CANCEL": "Cancel", - "LEAVE": "Leave" + "LEAVE": "Leave", + "POLICY-AGREE": "Make names publicly visible.", + "REQUIRED": "Click on checkbox is required." } }, "NOTIFICATION-DIALOG": {