mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-25 08:53:28 +00:00
ui: realm sync: use fieldset for remove-vanished & ux/wording
Use fieldsets, which are just way nicer for grouping these things. Disable the "remove properties" checkbox if we'd remove the whole user anyway. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3e43739f57
commit
04f27b64d9
@ -99,6 +99,22 @@ Ext.define('PVE.panel.LDAPSyncInputPanel', {
|
||||
extend: 'Proxmox.panel.InputPanel',
|
||||
xtype: 'pveAuthLDAPSyncPanel',
|
||||
|
||||
controller: {
|
||||
xclass: 'Ext.app.ViewController',
|
||||
control: {
|
||||
'proxmoxcheckbox[name=remove-vanished-entry]': {
|
||||
change: function(_f, removeEntries) {
|
||||
let propertyField = this.getView()
|
||||
.down('proxmoxcheckbox[name=remove-vanished-properties]');
|
||||
propertyField.setDisabled(removeEntries);
|
||||
if (removeEntries) {
|
||||
propertyField.setValue(true);
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
editableAttributes: ['email'],
|
||||
editableDefaults: ['scope', 'enable-new'],
|
||||
default_opts: {},
|
||||
@ -277,26 +293,28 @@ Ext.define('PVE.panel.LDAPSyncInputPanel', {
|
||||
|
||||
columnB: [
|
||||
{
|
||||
xtype: 'displayfield',
|
||||
fieldLabel: gettext('Remove Vanished'),
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('ACL'),
|
||||
name: 'remove-vanished-acl',
|
||||
boxLabel: gettext('Remove ACLs of users and groups which are not in the sync response.'),
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('Entry'),
|
||||
name: 'remove-vanished-entry',
|
||||
boxLabel: gettext('Remove users and groups that are not in the sync response.'),
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('Properties'),
|
||||
name: 'remove-vanished-properties',
|
||||
boxLabel: gettext('Remove user-properties that are not in the sync response.'),
|
||||
xtype: 'fieldset',
|
||||
title: gettext('Remove Vanished Options'),
|
||||
items: [
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('ACL'),
|
||||
name: 'remove-vanished-acl',
|
||||
boxLabel: gettext('Remove ACLs of vanished users and groups.'),
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('Entry'),
|
||||
name: 'remove-vanished-entry',
|
||||
boxLabel: gettext('Remove vanished user and group entries.'),
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('Properties'),
|
||||
name: 'remove-vanished-properties',
|
||||
boxLabel: gettext('Remove properties from vanished users.'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user