diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-09-02 16:14:09 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-09-02 16:14:54 -0400 |
commit | b0909f2e88bd374e742761bbc1645a25fc2b3eec (patch) | |
tree | a969725e6aa345e406fa40fbe02270ab331998c7 /src/usr/local/www/system_authservers.php | |
parent | a5ebda38d7a0983b88b4abbfd34ea792655b4a30 (diff) | |
download | pfsense-b0909f2e88bd374e742761bbc1645a25fc2b3eec.zip pfsense-b0909f2e88bd374e742761bbc1645a25fc2b3eec.tar.gz |
Fixed 5066
Toggles suck. Replaced with explicit jQuery
Diffstat (limited to 'src/usr/local/www/system_authservers.php')
-rw-r--r-- | src/usr/local/www/system_authservers.php | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php index 691ebef..e3c22d4 100644 --- a/src/usr/local/www/system_authservers.php +++ b/src/usr/local/www/system_authservers.php @@ -554,16 +554,18 @@ $section->addInput(new Form_Checkbox( 'Bind anonymous', 'Use anonymous binds to resolve distinguished names', $pconfig['ldap_anon'] -))->toggles('.toggle-anon'); +)); $group = new Form_Group('Bind credentials'); -$group->addClass('toggle-anon collapse'); +$group->addClass('ldapanon'); + $group->add(new Form_Input( 'ldap_binddn', 'User DN:', 'text', $pconfig['ldap_binddn'] )); + $group->add(new Form_Input( 'ldap_bindpw', 'Password', @@ -689,6 +691,15 @@ print $form; <script> //<![CDATA[ events.push(function(){ + + // Hides all elements of the specified class. This will usually be a section + function hideClass(s_class, hide) { + if(hide) + $('.' + s_class).hide(); + else + $('.' + s_class).show(); + } + function ldap_tmplchange() { switch ($('#ldap_tmpltype').find(":selected").index()) { <?php @@ -709,6 +720,7 @@ events.push(function(){ // On page load . . ldap_tmplchange(); + hideClass('ldapanon', $('#ldap_anon').prop('checked')); <?php if($act == 'edit') { @@ -722,6 +734,11 @@ events.push(function(){ $('#ldap_tmpltype').on('change', function() { ldap_tmplchange(); }); + + $('#ldap_anon').click(function () { + hideClass('ldapanon', this.checked); + }); + }); //]]> </script> |