Merge pull request #2819 from paperless-ngx/fix-2815

Fix: disable bulk edit dialog buttons during operation
This commit is contained in:
shamoon 2023-03-06 08:50:08 -08:00 committed by GitHub
commit 19b9fd0578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,