mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	visually disable edit fields for permissions
This commit is contained in:
		| @@ -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> |   <label *ngIf="title" class="form-label" [for]="inputId">{{title}}</label> | ||||||
|     <div [class.input-group]="allowCreateNew"> |     <div [class.input-group]="allowCreateNew"> | ||||||
|       <ng-select name="inputId" [(ngModel)]="value" |       <ng-select name="inputId" [(ngModel)]="value" | ||||||
|   | |||||||
| @@ -1 +1,14 @@ | |||||||
| // styles for ng-select child are in styles.scss | // 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; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|   | |||||||
| @@ -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> |   <label class="form-label" for="tags" i18n>Tags</label> | ||||||
|  |  | ||||||
|   <div class="input-group flex-nowrap"> |   <div class="input-group flex-nowrap"> | ||||||
|   | |||||||
| @@ -10,3 +10,17 @@ | |||||||
| .tag-wrap-delete { | .tag-wrap-delete { | ||||||
|   cursor: pointer; |   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; | ||||||
|  |       } | ||||||
|  |   } | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon