visually disable edit fields for permissions

This commit is contained in:
Michael Shamoon 2022-12-17 20:26:24 -08:00
parent f31cee75f3
commit b7e2013589
4 changed files with 29 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<div class="mb-3 paperless-input-select">
<div class="mb-3 paperless-input-select" [class.disabled]="disabled">
<label *ngIf="title" class="form-label" [for]="inputId">{{title}}</label>
<div [class.input-group]="allowCreateNew">
<ng-select name="inputId" [(ngModel)]="value"

View File

@ -1 +1,14 @@
// styles for ng-select child are in styles.scss
.paperless-input-select.disabled {
.input-group {
cursor: not-allowed;
}
::ng-deep ng-select {
pointer-events: none;
.ng-select-container {
background-color: var(--pngx-bg-alt) !important;
}
}
}

View File

@ -1,4 +1,4 @@
<div class="mb-3 paperless-input-select paperless-input-tags">
<div class="mb-3 paperless-input-select paperless-input-tags" [class.disabled]="disabled">
<label class="form-label" for="tags" i18n>Tags</label>
<div class="input-group flex-nowrap">

View File

@ -10,3 +10,17 @@
.tag-wrap-delete {
cursor: pointer;
}
.paperless-input-select.disabled {
.input-group {
cursor: not-allowed;
}
::ng-deep ng-select {
pointer-events: none;
.ng-select-container {
background-color: var(--pngx-bg-alt) !important;
}
}
}