diff --git a/public_html/css/default/LSconfirmBox.css b/public_html/css/default/LSconfirmBox.css index 83e133b5..93df08c5 100644 --- a/public_html/css/default/LSconfirmBox.css +++ b/public_html/css/default/LSconfirmBox.css @@ -3,7 +3,7 @@ border-radius: 5px; margin: auto; position: absolute; - z-index: 4; + z-index: 2001; display: none; position: absolute; background-color: #000; diff --git a/public_html/css/default/LSdefault.css b/public_html/css/default/LSdefault.css index 1e559cce..771a1c37 100644 --- a/public_html/css/default/LSdefault.css +++ b/public_html/css/default/LSdefault.css @@ -7,7 +7,7 @@ div.LSinfosBox { border: 1px solid #4096b8; visibility: hidden; color: #4096b8; - z-index: 100; + z-index: 2000; top: 10px; font-weight: bold; } diff --git a/public_html/css/default/LSform.css b/public_html/css/default/LSform.css index 40dc49c5..62a00491 100644 --- a/public_html/css/default/LSform.css +++ b/public_html/css/default/LSform.css @@ -14,8 +14,9 @@ ul.LSform_layout_active { margin-bottom: 0; } -li.LSform_layout_errors { - background-color: #f59a67; +li.LSform_layout_errors a { + color: #f59a67!important; + font-weight: bold; } h2.LSform_layout_active { @@ -66,6 +67,7 @@ dd.LSform { ul.LSform { list-style-type: none; padding: 0; + padding-top: 7px; margin: 0; } @@ -93,9 +95,9 @@ input[type='submit'].LSform { width: 8em; } -li.LSform-errors { - color: #fff; - background-color: #f59a67; +div.LSform-errors { + color: #dd4b39; + font-weight: bold; } dd.LSform-errors { diff --git a/public_html/css/default/LSformElement_select_object.css b/public_html/css/default/LSformElement_select_object.css index 7c3d5ac7..9d091cc6 100644 --- a/public_html/css/default/LSformElement_select_object.css +++ b/public_html/css/default/LSformElement_select_object.css @@ -17,6 +17,7 @@ ul.LSformElement_select_object_edit { border: 1px solid #b5e4f6; border-bottom: none; width: 200px; + padding-top: 0; } li.LSformElement_select_object { diff --git a/public_html/includes/class/class.LSsession.php b/public_html/includes/class/class.LSsession.php index 6f34dffb..33cd672c 100644 --- a/public_html/includes/class/class.LSsession.php +++ b/public_html/includes/class/class.LSsession.php @@ -556,10 +556,10 @@ class LSsession { LStemplate :: assign('LSsession_username',self :: getLSuserObject() -> getDisplayName()); - if (isset ($_POST['LSsession_topDn']) && $_POST['LSsession_topDn']) { - if (self :: validSubDnLdapServer($_POST['LSsession_topDn'])) { - self :: $topDn = $_POST['LSsession_topDn']; - $_SESSION['LSsession']['topDn'] = $_POST['LSsession_topDn']; + if (isset ($_REQUEST['LSsession_topDn']) && $_REQUEST['LSsession_topDn']) { + if (self :: validSubDnLdapServer($_REQUEST['LSsession_topDn'])) { + self :: $topDn = $_REQUEST['LSsession_topDn']; + $_SESSION['LSsession']['topDn'] = $_REQUEST['LSsession_topDn']; } // end if } // end if @@ -583,8 +583,8 @@ class LSsession { if (self :: LSldapConnect()) { // topDn - if (isset($_POST['LSsession_topDn']) && $_POST['LSsession_topDn'] != '' ){ - self :: $topDn = $_POST['LSsession_topDn']; + if (isset($_REQUEST['LSsession_topDn']) && $_REQUEST['LSsession_topDn'] != '' ){ + self :: $topDn = $_REQUEST['LSsession_topDn']; } else { self :: $topDn = self :: $ldapServer['ldap_config']['basedn']; diff --git a/public_html/includes/js/LSform.js b/public_html/includes/js/LSform.js index 79120fcd..22033966 100644 --- a/public_html/includes/js/LSform.js +++ b/public_html/includes/js/LSform.js @@ -69,7 +69,7 @@ var LSform = new Class({ LIs.each(function(li) { var Layout = this.getLayout(li); if ($type(Layout)) { - if ($type(Layout.getElement('dt.LSform-errors'))) { + if ($type(Layout.getElement('div.LSform-errors'))) { LSdebug('add'); li.addClass('LSform_layout_errors'); } @@ -278,7 +278,7 @@ var LSform = new Class({ data: this.LSform, onSuccess: this.onAjaxSubmitComplete.bind(this), url: this.LSform.get('action'), - imgload: varLSdefault.loadingImgDisplay($('LSform_title'),'inside') + imgload: varLSdefault.loadingImgDisplay($(event.target),'inside') }); this.LSform.send(); } @@ -309,11 +309,12 @@ var LSform = new Class({ }, resetErrors: function() { - $$('dd.LSform-errors').each(function(dd) { + $$('div.LSform-errors').each(function(dd) { dd.destroy(); }); - $$('dt.LSform-errors').each(function(dt) { - dt.removeClass('LSform-errors'); + $$('div.LSform_attribute').each(function(div) { + if (div.hasClass('has-error')) + div.removeClass('has-error'); }); $$('li.LSform_layout_errors').each(function(li) { li.removeClass('LSform_layout_errors'); @@ -326,16 +327,20 @@ var LSform = new Class({ if ($type(ul)) { errors = new Array(errors); errors.each(function(txt){ - var dd = new Element('dd'); - dd.addClass('LSform'); - dd.addClass('LSform-errors'); - dd.set('html',txt); - dd.injectAfter(this.getParent()); - },ul); + var div_group = new Element('div'); + div_group.addClass('form-group'); + div_group.addClass('LSform-errors'); + var div_error = new Element('div'); + div_error.addClass('col-md-offset-4'); + div_error.addClass('col-md-8'); + div_error.addClass('has-error'); + div_error.set('html',txt); + div_error.injectInside(div_group); + div_group.injectAfter(this); + },div_attr); - var dt = ul.getParent('dd.LSform').getPrevious('dt'); - if ($type(dt)) { - dt.addClass('LSform-errors'); + if ($type(div_attr)) { + div_attr.addClass('has-error'); } var layout = ul.getParent('div.LSform_layout_active'); diff --git a/public_html/templates/default/LSform.tpl b/public_html/templates/default/LSform.tpl index fd33c621..6a37e1cb 100644 --- a/public_html/templates/default/LSform.tpl +++ b/public_html/templates/default/LSform.tpl @@ -4,14 +4,16 @@
+{/if}