Dmp Clone - NewVersion Fix Disabled Propertys
This commit is contained in:
parent
89e13b2e03
commit
b498a53441
|
@ -44,7 +44,7 @@
|
|||
<div class="centered-row-item col-auto">
|
||||
<mat-checkbox [formControl]="fieldFormGroup.get('required')">{{'DMP-PROFILE-EDITOR.FIELDS.REQUIRED' | translate}}</mat-checkbox>
|
||||
</div>
|
||||
<div class="centered-row-item col-auto"><button mat-icon-button color="primary" type="button" (click)="removeField(i)">
|
||||
<div class="centered-row-item col-auto"><button mat-icon-button type="button" (click)="removeField(i)">
|
||||
<mat-icon class="mat-24">delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -22,5 +22,6 @@
|
|||
bottom: 10px !important;
|
||||
left: auto !important;
|
||||
position: fixed !important;
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,8 +47,15 @@ export class DmpWizardComponent extends BaseComponent implements OnInit, IBreadC
|
|||
.subscribe(data => {
|
||||
this.dmp = new DmpWizardEditorModel().fromModel(data);
|
||||
this.isClone = this.route.snapshot.data.clone;
|
||||
if (this.isClone === false) { this.dmp.version = this.dmp.version + 1; }
|
||||
this.formGroup = this.dmp.buildForm();
|
||||
|
||||
if (this.route.routeConfig.path.startsWith('new_version/')) {
|
||||
this.formGroup.get('version').setValue(this.dmp.version + 1);
|
||||
this.formGroup.controls['label'].disable();
|
||||
this.formGroup.controls['project'].disable();
|
||||
} else if (this.route.routeConfig.path.startsWith('clone/')) {
|
||||
this.formGroup.get('label').setValue(this.dmp.label + "New");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -99,11 +99,6 @@ export class DmpWizardEditorComponent extends BaseComponent implements OnInit {
|
|||
this.route.data
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(value => {
|
||||
if (value.clone === false && this.formGroup.get('label').value) {
|
||||
this.labelDisabled = true;
|
||||
this.formGroup.controls['label'].disable();
|
||||
this.formGroup.controls['project'].disable();
|
||||
}
|
||||
this.formGroup.controls['version'].disable();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue