implement superuser select-permissions disable

This commit is contained in:
Michael Shamoon
2022-11-15 01:06:12 -08:00
parent bace6eaeb0
commit 12e80dc487
3 changed files with 13 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
<form [formGroup]="form">
<form [formGroup]="form" [class.opacity-50]="disabled">
<label class="form-label">{{title}}</label>
<ul class="list-group">
<li class="list-group-item d-flex">
@@ -13,12 +13,12 @@
<div class="col-3">{{type.key}}:</div>
<div class="col form-check form-check-inline form-switch">
<input type="checkbox" class="form-check-input" id="{{type.key}}_all" (change)="toggleAll($event, type.key)" [checked]="typesWithAllActions.has(type.key)">
<input type="checkbox" class="form-check-input" id="{{type.key}}_all" (change)="toggleAll($event, type.key)" [checked]="typesWithAllActions.has(type.key)" [attr.disabled]="disabled ? true : null">
<label class="form-check-label visually-hidden" for="{{type.key}}_all" i18n>All</label>
</div>
<div *ngFor="let action of PermissionAction | keyvalue" class="col form-check form-check-inline">
<input type="checkbox" class="form-check-input" id="{{type.key}}_{{action.key}}" formControlName="{{action.key}}" [attr.disabled]="typesWithAllActions.has(type.key) ? true : null">
<input type="checkbox" class="form-check-input" id="{{type.key}}_{{action.key}}" formControlName="{{action.key}}" [attr.disabled]="typesWithAllActions.has(type.key) || disabled ? true : null">
<label class="form-check-label visually-hidden" for="{{type.key}}_{{action.key}}" i18n>{{action.key}}</label>
</div>
</li>