]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: Update Host in configuration chooser on Save
authorArthur Schiwon <blizzz@owncloud.com>
Thu, 15 Aug 2013 14:10:49 +0000 (16:10 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Thu, 15 Aug 2013 14:10:49 +0000 (16:10 +0200)
apps/user_ldap/js/settings.js

index 52d5dbc48d97d85431aacedc3aaa417db30816b0..b86aac6da67d162ea71105a22b6e55d05e7d02b4 100644 (file)
@@ -176,6 +176,13 @@ $(document).ready(function() {
                                        $('#ldap_submit').effect('highlight', {'color':'#A8FA87'}, 5000, function() {
                                                $('#ldap_submit').css('background', bgcolor);
                                        });
+                                       //update the Label in the config chooser
+                                       caption = $('#ldap_serverconfig_chooser option:selected:first').text();
+                                       pretext = '. Server: ';
+                                       caption = caption.slice(0, caption.indexOf(pretext) + pretext.length);
+                                       caption = caption + $('#ldap_host').val();
+                                       $('#ldap_serverconfig_chooser option:selected:first').text(caption);
+
                                } else {
                                        $('#ldap_submit').css('background', '#fff');
                                        $('#ldap_submit').effect('highlight', {'color':'#E97'}, 5000, function() {