Fix
This commit is contained in:
parent
271e22efc1
commit
3c112d44b6
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
<button (click)="save()" [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
{{ 'add-edit-dictionary.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-actions">
|
||||
<button [disabled]="form.invalid || !changed" color="primary" mat-flat-button>
|
||||
<button (click)="save()" [disabled]="form.invalid || !changed" color="primary" mat-flat-button>
|
||||
{{ 'add-edit-dossier-attribute.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -30,19 +30,6 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe impl
|
||||
super();
|
||||
}
|
||||
|
||||
private _getForm(dossierAttribute: IDossierAttributeConfig): FormGroup {
|
||||
return this._formBuilder.group({
|
||||
label: [dossierAttribute?.label, Validators.required],
|
||||
...(!!dossierAttribute && {
|
||||
placeholder: {
|
||||
value: dossierAttribute.placeholder,
|
||||
disabled: true,
|
||||
},
|
||||
}),
|
||||
type: [dossierAttribute?.type || FileAttributeConfigTypes.TEXT, Validators.required],
|
||||
});
|
||||
}
|
||||
|
||||
get changed(): boolean {
|
||||
if (!this.dossierAttribute) {
|
||||
return true;
|
||||
@ -57,7 +44,7 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe impl
|
||||
return false;
|
||||
}
|
||||
|
||||
saveDossierAttribute() {
|
||||
save() {
|
||||
this._loadingService.start();
|
||||
|
||||
const attribute: IDossierAttributeConfig = {
|
||||
@ -81,7 +68,20 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribe impl
|
||||
onEnter(event: KeyboardEvent): void {
|
||||
const node = (event.target as IqserEventTarget).localName;
|
||||
if (this.form.valid && this.changed && node !== 'textarea') {
|
||||
this.saveDossierAttribute();
|
||||
this.save();
|
||||
}
|
||||
}
|
||||
|
||||
private _getForm(dossierAttribute: IDossierAttributeConfig): FormGroup {
|
||||
return this._formBuilder.group({
|
||||
label: [dossierAttribute?.label, Validators.required],
|
||||
...(!!dossierAttribute && {
|
||||
placeholder: {
|
||||
value: dossierAttribute.placeholder,
|
||||
disabled: true,
|
||||
},
|
||||
}),
|
||||
type: [dossierAttribute?.type || FileAttributeConfigTypes.TEXT, Validators.required],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
<button (click)="save()" [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
{{ 'add-edit-dossier-template.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-actions">
|
||||
<button [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
<button (click)="save()" [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
{{ 'add-edit-file-attribute.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
<button (click)="save()" [disabled]="!valid || !changed" color="primary" mat-flat-button>
|
||||
{{ 'edit-color-dialog.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user