mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
32 lines
1.7 KiB
HTML
32 lines
1.7 KiB
HTML
<form [formGroup]="form" [class.opacity-50]="disabled">
|
|
<label class="form-label">{{title}}</label>
|
|
<ul class="list-group">
|
|
<li class="list-group-item d-flex">
|
|
<div class="col-3" i18n>Type</div>
|
|
<div class="col" i18n>All</div>
|
|
<div class="col" i18n>Add</div>
|
|
<div class="col" i18n>Change</div>
|
|
<div class="col" i18n>Delete</div>
|
|
<div class="col" i18n>View</div>
|
|
</li>
|
|
@for (type of allowedTypes; track type) {
|
|
<li class="list-group-item d-flex" [formGroupName]="type">
|
|
<div class="col-3">{{type}}:</div>
|
|
<div class="col form-check form-check-inline form-switch" [ngbPopover]="inheritedWarning" [disablePopover]="!isInherited(type)" placement="left" triggers="mouseenter:mouseleave">
|
|
<input type="checkbox" class="form-check-input" id="{{type}}_all" (change)="toggleAll($event, type)" [checked]="typesWithAllActions.has(type) || isInherited(type)" [attr.disabled]="disabled || isInherited(type) ? true : null">
|
|
<label class="form-check-label visually-hidden" for="{{type}}_all" i18n>All</label>
|
|
</div>
|
|
@for (action of PermissionAction | keyvalue; track action) {
|
|
<div class="col form-check form-check-inline" [ngbPopover]="inheritedWarning" [disablePopover]="!isInherited(type, action.key)" placement="left" triggers="mouseenter:mouseleave">
|
|
<input type="checkbox" class="form-check-input" id="{{type}}_{{action.key}}" formControlName="{{action.key}}">
|
|
<label class="form-check-label visually-hidden" for="{{type}}_{{action.key}}" i18n>{{action.key}}</label>
|
|
</div>
|
|
}
|
|
</li>
|
|
}
|
|
@if (error) {
|
|
<div class="invalid-feedback d-block">{{error}}</div>
|
|
}
|
|
</ul>
|
|
</form>
|