LDAP Wizard: move raw login filter field from advanced tab to login filter tab for consistency
This commit is contained in:
parent
447e468d1a
commit
98c9334175
|
@ -613,6 +613,8 @@ var LdapWizard = {
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleRawFilter: function(container, moc, mg, stateVar) {
|
toggleRawFilter: function(container, moc, mg, stateVar) {
|
||||||
|
//moc = multiselect objectclass
|
||||||
|
//mg = mutliselect groups
|
||||||
if($(container).hasClass('invisible')) {
|
if($(container).hasClass('invisible')) {
|
||||||
$(container).removeClass('invisible');
|
$(container).removeClass('invisible');
|
||||||
$(moc).multiselect('disable');
|
$(moc).multiselect('disable');
|
||||||
|
@ -637,6 +639,22 @@ var LdapWizard = {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleRawLoginFilter: function() {
|
||||||
|
container = '#rawLoginFilterContainer';
|
||||||
|
if($(container).hasClass('invisible')) {
|
||||||
|
$(container).removeClass('invisible');
|
||||||
|
action = 'disable';
|
||||||
|
property = 'disabled';
|
||||||
|
} else {
|
||||||
|
$(container).addClass('invisible');
|
||||||
|
action = 'enable';
|
||||||
|
property = false;
|
||||||
|
}
|
||||||
|
$('#ldap_loginfilter_attributes').multiselect(action);
|
||||||
|
$('#ldap_loginfilter_email').prop('disabled', property);
|
||||||
|
$('#ldap_loginfilter_username').prop('disabled', property);
|
||||||
|
},
|
||||||
|
|
||||||
toggleRawUserFilter: function() {
|
toggleRawUserFilter: function() {
|
||||||
LdapWizard.toggleRawFilter('#rawUserFilterContainer',
|
LdapWizard.toggleRawFilter('#rawUserFilterContainer',
|
||||||
'#ldap_userfilter_objectclass',
|
'#ldap_userfilter_objectclass',
|
||||||
|
@ -670,6 +688,7 @@ $(document).ready(function() {
|
||||||
$('.lwautosave').change(function() { LdapWizard.save(this); });
|
$('.lwautosave').change(function() { LdapWizard.save(this); });
|
||||||
$('#toggleRawUserFilter').click(LdapWizard.toggleRawUserFilter);
|
$('#toggleRawUserFilter').click(LdapWizard.toggleRawUserFilter);
|
||||||
$('#toggleRawGroupFilter').click(LdapWizard.toggleRawGroupFilter);
|
$('#toggleRawGroupFilter').click(LdapWizard.toggleRawGroupFilter);
|
||||||
|
$('#toggleRawLoginFilter').click(LdapWizard.toggleRawLoginFilter);
|
||||||
LdapConfiguration.refreshConfig();
|
LdapConfiguration.refreshConfig();
|
||||||
$('.ldap_action_continue').click(function(event) {
|
$('.ldap_action_continue').click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -28,6 +28,16 @@
|
||||||
name="ldap_loginfilter_attributes">
|
name="ldap_loginfilter_attributes">
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<label><a id='toggleRawLoginFilter'>↓ <?php p($l->t('Edit raw filter instead'));?></a></label>
|
||||||
|
</p>
|
||||||
|
<p id="rawLoginFilterContainer" class="invisible">
|
||||||
|
<input type="text" id="ldap_login_filter" name="ldap_login_filter"
|
||||||
|
class="lwautosave"
|
||||||
|
placeholder="<?php p($l->t('Raw LDAP filter'));?>"
|
||||||
|
title="<?php p($l->t('Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: "uid=%%uid"'));?>"
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<div class="ldapWizardInfo invisible"> </div>
|
<div class="ldapWizardInfo invisible"> </div>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -20,9 +20,6 @@
|
||||||
<h3><?php p($l->t('Connection Settings'));?></h3>
|
<h3><?php p($l->t('Connection Settings'));?></h3>
|
||||||
<div>
|
<div>
|
||||||
<p><label for="ldap_configuration_active"><?php p($l->t('Configuration Active'));?></label><input type="checkbox" id="ldap_configuration_active" name="ldap_configuration_active" value="1" data-default="<?php p($_['ldap_configuration_active_default']); ?>" title="<?php p($l->t('When unchecked, this configuration will be skipped.'));?>" /></p>
|
<p><label for="ldap_configuration_active"><?php p($l->t('Configuration Active'));?></label><input type="checkbox" id="ldap_configuration_active" name="ldap_configuration_active" value="1" data-default="<?php p($_['ldap_configuration_active_default']); ?>" title="<?php p($l->t('When unchecked, this configuration will be skipped.'));?>" /></p>
|
||||||
<p><label for="ldap_login_filter"><?php p($l->t('User Login Filter'));?></label><input type="text" id="ldap_login_filter" name="ldap_login_filter"
|
|
||||||
data-default="<?php p($_['ldap_login_filter_default']); ?>"
|
|
||||||
title="<?php p($l->t('Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: "uid=%%uid"'));?>" /></p>
|
|
||||||
<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
|
<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
|
||||||
<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
|
<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
|
||||||
<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
|
<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
|
||||||
|
|
Loading…
Reference in New Issue