mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Fix: frontend better reflect global perms for bulk edit, disabled form state (#8469)
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
div, .ng-arrow-wrapper, input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
background-color: var(--pngx-bg-alt) !important;
|
||||
background-color: var(--pngx-bg-disabled) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -66,4 +66,11 @@ describe('PermissionsFormComponent', () => {
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
it('should disable form on disabled state change', () => {
|
||||
component.setDisabledState(false)
|
||||
expect(component.form.disabled).toBeFalsy()
|
||||
component.setDisabledState(true)
|
||||
expect(component.form.disabled).toBeTruthy()
|
||||
})
|
||||
})
|
||||
|
@@ -66,4 +66,12 @@ export class PermissionsFormComponent
|
||||
writeValue(newValue: any): void {
|
||||
this.form.patchValue(newValue, { emitEvent: false })
|
||||
}
|
||||
|
||||
public setDisabledState(isDisabled: boolean): void {
|
||||
if (isDisabled) {
|
||||
this.form.disable()
|
||||
} else {
|
||||
this.form.enable()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
pointer-events: none;
|
||||
|
||||
.ng-select-container {
|
||||
background-color: var(--pngx-bg-alt) !important;
|
||||
background-color: var(--pngx-bg-disabled) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
pointer-events: none;
|
||||
|
||||
.ng-select-container {
|
||||
background-color: var(--pngx-bg-alt) !important;
|
||||
background-color: var(--pngx-bg-disabled) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
pointer-events: none;
|
||||
|
||||
.ng-select-container {
|
||||
background-color: var(--pngx-bg-alt) !important;
|
||||
background-color: var(--pngx-bg-disabled) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
pointer-events: none;
|
||||
|
||||
.ng-select-container {
|
||||
background-color: var(--pngx-bg-alt) !important;
|
||||
background-color: var(--pngx-bg-disabled) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user