type: 'ldap',
+ onlineHelp: 'user-realms-ldap',
+
onGetValues: function(values) {
if (this.isCreate) {
values.type = this.type;
},
onSetValues: function(values) {
+ let me = this;
values.anonymous_search = values["bind-dn"] ? 0 : 1;
+ me.getViewModel().set('anonymous_search', values.anonymous_search);
return values;
},
xtype: 'proxmoxcheckbox',
fieldLabel: gettext('Anonymous Search'),
name: 'anonymous_search',
- bind: '{anonymous_search}',
+ bind: {
+ value: '{anonymous_search}',
+ },
},
{
xtype: 'proxmoxtextfield',
xtype: 'pmxAuthLDAPSyncPanel',
mixins: ['Proxmox.Mixin.CBind'],
- editableAttributes: ['email'],
+ editableAttributes: ['firstname', 'lastname', 'email'],
editableDefaults: ['scope', 'enable-new'],
default_opts: {},
sync_attributes: {},
Proxmox.Utils.delete_if_default(values, 'sync-defaults-options');
Proxmox.Utils.delete_if_default(values, 'sync-attributes');
+ // Force values.delete to be an array
+ if (typeof values.delete === 'string') {
+ values.delete = values.delete.split(',');
+ }
+
if (me.isCreate) {
delete values.delete; // on create we cannot delete values
}
},
column1: [
+ {
+ xtype: 'proxmoxtextfield',
+ name: 'firstname',
+ fieldLabel: gettext('First Name attribute'),
+ },
+ {
+ xtype: 'proxmoxtextfield',
+ name: 'lastname',
+ fieldLabel: gettext('Last Name attribute'),
+ },
{
xtype: 'proxmoxtextfield',
name: 'email',