diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-07-26 18:10:53 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-07-26 18:11:12 +0200 |
commit | 6fbed6a5881c83f14777a4881996ac6d760bb251 (patch) | |
tree | 4965fb120345a78428039a0186f550465fde949f /apps/user_ldap/js/settings.js | |
parent | d26f87e738314db7820f39f74f42865ff20f7bd7 (diff) | |
download | nextcloud-server-6fbed6a5881c83f14777a4881996ac6d760bb251.tar.gz nextcloud-server-6fbed6a5881c83f14777a4881996ac6d760bb251.zip |
LDAP: add Test Configuration functionality in the settings
Diffstat (limited to 'apps/user_ldap/js/settings.js')
-rw-r--r-- | apps/user_ldap/js/settings.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index cae9655e3df..4e5923406ea 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -1,3 +1,25 @@ $(document).ready(function() { $('#ldapSettings').tabs(); + $('#ldap_action_test_connection').button(); + $('#ldap_action_test_connection').click(function(event){ + event.preventDefault(); + $.post( + OC.filePath('user_ldap','ajax','testConfiguration.php'), + $('#ldap').serialize(), + function (result) { + if (result.status == 'success') { + OC.dialogs.alert( + result.message, + 'Connection test succeeded' + ); + } else { + $('#ldap_action_test_connection').css('background-color', 'red'); + OC.dialogs.alert( + result.message, + 'Connection test failed' + ); + } + } + ); + }); });
\ No newline at end of file |