+
-
+
+
+
+ {{'DMP-PROFILE-EDITOR.TITLE.NEW' | translate}}
+{{formGroup.get('label').value}}
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.scss b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.scss
index 972e19d7b..ae188ac09 100644
--- a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.scss
+++ b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.scss
@@ -1,5 +1,7 @@
.dmp-profile-editor {
margin-top: 1.3rem;
+ margin-left: 1em;
+ margin-right: 3em;
.centered-row-item {
align-items: center;
@@ -25,3 +27,37 @@
::ng-deep .mat-checkbox-disabled.mat-checkbox-checked .mat-checkbox-background, .mat-checkbox-disabled.mat-checkbox-indeterminate .mat-checkbox-background {
background-color: #b0b0b0;
}
+
+.finalize-btn {
+ border-radius: 30px;
+ border: 1px solid #129D99;
+ background: transparent;
+ padding-left: 2em;
+ padding-right: 2em;
+ box-shadow: 0px 3px 6px #1E202029;
+ color: #129D99;
+ &:disabled{
+ background-color: #CBCBCB;
+ color: #FFF;
+ border: 0px;
+ }
+}
+
+.action-btn {
+ border-radius: 30px;
+ background-color: #f7dd72;
+ border: 1px solid transparent;
+ padding-left: 2em;
+ padding-right: 2em;
+ box-shadow: 0px 3px 6px #1E202029;
+
+ transition-property: background-color, color;
+ transition-duration: 200ms;
+ transition-delay: 50ms;
+ transition-timing-function: ease-in-out;
+ &:disabled{
+ background-color: #CBCBCB;
+ color: #FFF;
+ border: 0px;
+ }
+}
\ No newline at end of file
diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts
index 90cc566e0..0de715ef4 100644
--- a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts
+++ b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts
@@ -23,6 +23,8 @@ import { map, takeUntil } from 'rxjs/operators';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { HttpClient } from '@angular/common/http';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
+import { MatDialog } from '@angular/material';
+import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
@Component({
@@ -50,7 +52,8 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
private formService: FormService,
private configurationService: ConfigurationService,
private httpClient: HttpClient,
- private matomoService: MatomoService
+ private matomoService: MatomoService,
+ private dialog: MatDialog
) {
super();
this.host = configurationService.server;
@@ -177,13 +180,27 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
}
delete() {
- this.formGroup.get('status').setValue(DmpProfileStatus.Deleted);
- this.dmpProfileService.createDmp(this.formGroup.value)
- .pipe(takeUntil(this._destroyed))
- .subscribe(
- complete => this.onCallbackSuccess(),
- error => this.onCallbackError(error)
- );
+ this.dialog.open(ConfirmationDialogComponent,{data:{
+ isDeleteConfirmation: true,
+ confirmButton: this.language.instant('DMP-PROFILE-EDITOR.CONFIRM-DELETE-DIALOG.CONFIRM-BUTTON'),
+ cancelButton: this.language.instant("DMP-PROFILE-EDITOR.CONFIRM-DELETE-DIALOG.CANCEL-BUTTON"),
+ message: this.language.instant("DMP-PROFILE-EDITOR.CONFIRM-DELETE-DIALOG.MESSAGE")
+ }})
+ .afterClosed()
+ .subscribe(
+ confirmed =>{
+ if(confirmed){
+ this.formGroup.get('status').setValue(DmpProfileStatus.Deleted);
+ this.dmpProfileService.createDmp(this.formGroup.value)
+ .pipe(takeUntil(this._destroyed))
+ .subscribe(
+ complete => this.onCallbackSuccess(),
+ error => this.onCallbackError(error)
+ );
+ }
+ }
+ )
+
}
finalize() {
diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/listing/criteria/dmp-profile-criteria.component.scss b/dmp-frontend/src/app/ui/admin/dmp-profile/listing/criteria/dmp-profile-criteria.component.scss
index 0cea7d62b..88846d9a8 100644
--- a/dmp-frontend/src/app/ui/admin/dmp-profile/listing/criteria/dmp-profile-criteria.component.scss
+++ b/dmp-frontend/src/app/ui/admin/dmp-profile/listing/criteria/dmp-profile-criteria.component.scss
@@ -8,6 +8,6 @@
}
.dmp-criteria{
- margin-top: 4em;
- margin-bottom: 2em;
+ margin-top: 3em;
+ margin-bottom: 0em;
}
\ No newline at end of file
diff --git a/dmp-frontend/src/assets/i18n/de.json b/dmp-frontend/src/assets/i18n/de.json
index 83bcf5f66..ac755028c 100644
--- a/dmp-frontend/src/assets/i18n/de.json
+++ b/dmp-frontend/src/assets/i18n/de.json
@@ -908,6 +908,11 @@
"DELETE": "Löschen",
"FINALIZE": "Finalize",
"DOWNLOAD-XML": "Download XML"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json
index 586f64ce0..c8913786a 100644
--- a/dmp-frontend/src/assets/i18n/en.json
+++ b/dmp-frontend/src/assets/i18n/en.json
@@ -908,6 +908,11 @@
"DELETE": "Delete",
"FINALIZE": "Finalize",
"DOWNLOAD-XML": "Download XML"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json
index 512aa604e..4806a5d5c 100644
--- a/dmp-frontend/src/assets/i18n/es.json
+++ b/dmp-frontend/src/assets/i18n/es.json
@@ -908,6 +908,11 @@
"DELETE": "Borrar",
"FINALIZE": "Finalizar",
"DOWNLOAD-XML": "Descargar XML"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json
index 1dc0d7138..bd736b761 100644
--- a/dmp-frontend/src/assets/i18n/gr.json
+++ b/dmp-frontend/src/assets/i18n/gr.json
@@ -908,6 +908,11 @@
"DELETE": "Διαγραφή",
"FINALIZE": "Οριστικοποίηση",
"DOWNLOAD-XML": "Ληψη XML"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
diff --git a/dmp-frontend/src/assets/i18n/pt.json b/dmp-frontend/src/assets/i18n/pt.json
index 164d7e7db..eaf12329a 100644
--- a/dmp-frontend/src/assets/i18n/pt.json
+++ b/dmp-frontend/src/assets/i18n/pt.json
@@ -908,6 +908,11 @@
"DELETE": "Eliminar",
"FINALIZE": "Concluir",
"DOWNLOAD-XML": "Exportar para XML"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
diff --git a/dmp-frontend/src/assets/i18n/sk.json b/dmp-frontend/src/assets/i18n/sk.json
index abb01ecde..7d3c8efb7 100644
--- a/dmp-frontend/src/assets/i18n/sk.json
+++ b/dmp-frontend/src/assets/i18n/sk.json
@@ -908,6 +908,11 @@
"DELETE": "Vymazať",
"FINALIZE": "Dokončiť",
"DOWNLOAD-XML": "Stiahnuť XML"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
diff --git a/dmp-frontend/src/assets/i18n/sr.json b/dmp-frontend/src/assets/i18n/sr.json
index 37ffc6179..e7075e147 100644
--- a/dmp-frontend/src/assets/i18n/sr.json
+++ b/dmp-frontend/src/assets/i18n/sr.json
@@ -908,6 +908,11 @@
"DELETE": "Obrišite",
"FINALIZE": "Dovršite",
"DOWNLOAD-XML": "Preuzmite XML"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
diff --git a/dmp-frontend/src/assets/i18n/tr.json b/dmp-frontend/src/assets/i18n/tr.json
index 522d1aa13..ee6213535 100644
--- a/dmp-frontend/src/assets/i18n/tr.json
+++ b/dmp-frontend/src/assets/i18n/tr.json
@@ -908,6 +908,11 @@
"DELETE": "Sil",
"FINALIZE": "Tamamla",
"DOWNLOAD-XML": "XML İndir"
+ },
+ "CONFIRM-DELETE-DIALOG":{
+ "MESSAGE": "Would you like to delete this DMP template?",
+ "CONFIRM-BUTTON": "Yes, delete",
+ "CANCEL-BUTTON": "No"
}
},
"GRANT-EDITOR": {
+