LdapWizard.functionalityCheck();
},
+ basicStatusCheck: function() {
+ //criterias to continue from the first tab
+ // - host, port, user filter, agent dn, password, base dn
+ host = $('#ldap_host').val();
+ port = $('#ldap_port').val();
+ agent = $('#ldap_dn').val();
+ pwd = $('#ldap_agent_password').val();
+ base = $('#ldap_base').val();
+
+ if(host && port && agent && pwd && base) {
+ $('.ldap_action_continue').removeAttr('disabled');
+ } else {
+ $('.ldap_action_continue').attr('disabled', 'disabled');
+ }
+ },
+
checkBaseDN: function() {
host = $('#ldap_host').val();
port = $('#ldap_port').val();
);
},
+ controlBack: function() {
+ curTabIndex = $('#ldapSettings').tabs('option', 'active');
+ if(curTabIndex == 0) {
+ return;
+ }
+ if(curTabIndex == 1) {
+ $('.ldap_action_back').addClass('invisible');
+ }
+ $('#ldapSettings').tabs('option', 'active', curTabIndex - 1);
+ if(curTabIndex == 3) {
+ $('.ldap_action_continue').removeClass('invisible');
+ }
+ },
+
+ controlContinue: function() {
+ curTabIndex = $('#ldapSettings').tabs('option', 'active');
+ if(curTabIndex == 3) {
+ return;
+ }
+ $('#ldapSettings').tabs('option', 'active', 1 + curTabIndex);
+ if(curTabIndex == 2) {
+ //now last tab
+ $('.ldap_action_continue').addClass('invisible');
+ }
+ if(curTabIndex == 0) {
+ $('.ldap_action_back').removeClass('invisible');
+ }
+ },
+
_countThings: function(method) {
param = 'action='+method+
'&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
if($('#ldap_port').val()) {
$('#ldap_port').removeClass('invisible');
}
+ LdapWizard.basicStatusCheck();
},
initGroupFilter: function() {
|| triggerObj.id == 'ldap_loginfilter_email') {
LdapWizard.composeFilter('login');
}
+
+ if($('#ldapSettings').tabs('option', 'active') == 0) {
+ LdapWizard.basicStatusCheck();
+ }
},
save: function(inputObj) {
$('#toggleRawUserFilter').click(LdapWizard.toggleRawUserFilter);
$('#toggleRawGroupFilter').click(LdapWizard.toggleRawGroupFilter);
LdapConfiguration.refreshConfig();
+ $('.ldap_action_continue').click(function(event) {
+ event.preventDefault();
+ LdapWizard.controlContinue();
+ });
+ $('.ldap_action_back').click(function(event) {
+ event.preventDefault();
+ LdapWizard.controlBack();
+ });
$('#ldap_action_test_connection').click(function(event){
event.preventDefault();
$.post(