When creating new DMPs pre-set the visibility (restricted) and the contact (creator). They can be changed later in the draft phase.
This commit is contained in:
parent
3ba34e1e69
commit
e428e8a5df
|
@ -101,6 +101,8 @@ public class DmpQuickWizardModel {
|
||||||
dataManagementPlanEntity.setAssociatedUsers(user);
|
dataManagementPlanEntity.setAssociatedUsers(user);
|
||||||
dataManagementPlanEntity.setExtraProperties(new HashMap<>());
|
dataManagementPlanEntity.setExtraProperties(new HashMap<>());
|
||||||
dataManagementPlanEntity.getExtraProperties().put("language", this.language);
|
dataManagementPlanEntity.getExtraProperties().put("language", this.language);
|
||||||
|
dataManagementPlanEntity.getExtraProperties().put("visible", false);
|
||||||
|
dataManagementPlanEntity.getExtraProperties().put("contact", principal.getId().toString());
|
||||||
return dataManagementPlanEntity;
|
return dataManagementPlanEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -228,6 +228,8 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
this.dmp.project = new ProjectFormModel();
|
this.dmp.project = new ProjectFormModel();
|
||||||
this.dmp.funder = new FunderFormModel();
|
this.dmp.funder = new FunderFormModel();
|
||||||
this.dmp.extraProperties = new ExtraPropertiesFormModel();
|
this.dmp.extraProperties = new ExtraPropertiesFormModel();
|
||||||
|
this.dmp.extraProperties.visible = false;
|
||||||
|
this.dmp.extraProperties.contact = this.authService.current().id;
|
||||||
this.formGroup = this.dmp.buildForm();
|
this.formGroup = this.dmp.buildForm();
|
||||||
this.registerFormEventsForNewItem();
|
this.registerFormEventsForNewItem();
|
||||||
if (this.isAuthenticated) {
|
if (this.isAuthenticated) {
|
||||||
|
|
Loading…
Reference in New Issue