mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-15 02:57:09 +01:00
Fix: frontend better reflect global perms for bulk edit, disabled form state (#8469)
This commit is contained in:
parent
beb8ed8313
commit
2ac2a6dec6
14 changed files with 150 additions and 108 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue