summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/js/settings.js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-11-11 15:16:54 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-11-11 15:16:54 +0100
commitda61c6ef72abd54d98e9b1aa4300dba6a0eff3f0 (patch)
treeed73bb12812830ee08dd403fd4a6d5555bf32402 /apps/user_ldap/js/settings.js
parentea9f392f4e571bac223f0e8b0c5ee122b16ac76a (diff)
downloadnextcloud-server-da61c6ef72abd54d98e9b1aa4300dba6a0eff3f0.tar.gz
nextcloud-server-da61c6ef72abd54d98e9b1aa4300dba6a0eff3f0.zip
LDAP Wizard: determine port without credentials. don't hide the port input field
Diffstat (limited to 'apps/user_ldap/js/settings.js')
-rw-r--r--apps/user_ldap/js/settings.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js
index 721674ee8e4..6496c6aee59 100644
--- a/apps/user_ldap/js/settings.js
+++ b/apps/user_ldap/js/settings.js
@@ -202,7 +202,7 @@ var LdapWizard = {
},
function (result) {
LdapWizard.hideSpinner('#ldap_base');
- LdapWizard.showInfoBox('Please specify a port');
+ LdapWizard.showInfoBox('Please specify a Base DN');
}
);
}
@@ -210,28 +210,28 @@ var LdapWizard = {
checkPort: function() {
host = $('#ldap_host').val();
- user = $('#ldap_dn').val();
- pass = $('#ldap_agent_password').val();
+ port = $('#ldap_port').val();
- if(host && user && pass) {
+ if(host && !port) {
param = 'action=guessPortAndTLS'+
'&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
LdapWizard.showSpinner('#ldap_port');
+ $('#ldap_port').prop('disabled', 'disabled');
LdapWizard.ajax(param,
function(result) {
LdapWizard.applyChanges(result);
LdapWizard.hideSpinner('#ldap_port');
if($('#ldap_port').val()) {
LdapWizard.checkBaseDN();
- $('#ldap_port').removeClass('invisible');
+ $('#ldap_port').prop('disabled', false);
LdapWizard.hideInfoBox();
}
},
function (result) {
LdapWizard.hideSpinner('#ldap_port');
- $('#ldap_port').removeClass('invisible');
- LdapWizard.showInfoBox('Please specify the BaseDN');
+ $('#ldap_port').prop('disabled', false);
+ LdapWizard.showInfoBox('Please specify the Port');
}
);
}
@@ -459,9 +459,6 @@ var LdapWizard = {
},
init: function() {
- if($('#ldap_port').val()) {
- $('#ldap_port').removeClass('invisible');
- }
LdapWizard.basicStatusCheck();
},
@@ -516,6 +513,8 @@ var LdapWizard = {
},
processChanges: function(triggerObj) {
+ LdapWizard.hideInfoBox();
+
if(triggerObj.id == 'ldap_host'
|| triggerObj.id == 'ldap_port'
|| triggerObj.id == 'ldap_dn'