disable bulk edit permissions dialog buttons on submit

This commit is contained in:
shamoon 2023-03-03 19:32:39 -08:00
parent f0fa726e71
commit e6aa213aa1
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,6 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-primary" (click)="cancelClicked()" i18n>Cancel</button>
<button type="button" class="btn btn-primary" (click)="confirmClicked.emit(permissions)" i18n>Confirm</button>
<button type="button" class="btn btn-outline-primary" (click)="cancelClicked()" [disabled]="!buttonsEnabled" i18n>Cancel</button>
<button type="button" class="btn btn-primary" (click)="confirmClicked.emit(permissions)" [disabled]="!buttonsEnabled" i18n>Confirm</button>
</div>

View File

@ -29,6 +29,8 @@ export class PermissionsDialogComponent {
permissions_form: new FormControl(),
})
buttonsEnabled: boolean = true
get permissions() {
return {
owner: this.form.get('permissions_form').value?.owner ?? null,