* switches all LDAP filters from Assisted to Raw mode.
*/
ExperiencedAdmin.prototype.enableRawMode = function() {
- var containers = {
- 'toggleRawGroupFilter': '#rawGroupFilterContainer',
- 'toggleRawLoginFilter': '#rawLoginFilterContainer',
- 'toggleRawUserFilter' : '#rawUserFilterContainer'
- };
-
- for(var method in containers) {
- if($(containers[method]).hasClass('invisible')) {
- this.wizard[method]();
- }
- }
+ LdapWizard._save({id: 'ldapGroupFilterMode'}, LdapWizard.filterModeRaw);
+ LdapWizard._save({id: 'ldapUserFilterMode' }, LdapWizard.filterModeRaw);
+ LdapWizard._save({id: 'ldapLoginFilterMode'}, LdapWizard.filterModeRaw);
};
ExperiencedAdmin.prototype.updateUserTab = function(mode) {
}
},
- onToggleRawFilterConfirmation: function(currentMode, callback) {
- if(!LdapWizard.admin.isExperienced()
- || currentMode === LdapWizard.filterModeAssisted
+ onToggleRawFilterConfirmation: function(currentMode, isRawVisible, callback) {
+ if( !LdapWizard.admin.isExperienced()
+ || currentMode === LdapWizard.filterModeAssisted
+ || (LdapWizard.admin.isExperienced() && !isRawVisible)
) {
return callback(true);
}
toggleRawGroupFilter: function() {
LdapWizard.onToggleRawFilterConfirmation(
LdapWizard.groupFilter.getMode(),
+ !$('#rawGroupFilterContainer').hasClass('invisible'),
function(confirmed) {
if(confirmed !== true) {
return;
toggleRawLoginFilter: function() {
LdapWizard.onToggleRawFilterConfirmation(
LdapWizard.loginFilter.getMode(),
+ !$('#rawLoginFilterContainer').hasClass('invisible'),
function(confirmed) {
if(confirmed !== true) {
return;
toggleRawUserFilter: function() {
LdapWizard.onToggleRawFilterConfirmation(
LdapWizard.userFilter.getMode(),
+ !$('#rawUserFilterContainer').hasClass('invisible'),
function(confirmed) {
if(confirmed === true) {
LdapWizard.blacklistRemove('ldap_userlist_filter');