diff --git a/lam/templates/config/conflogin.php b/lam/templates/config/conflogin.php index 6140b6eb..4363a9ea 100644 --- a/lam/templates/config/conflogin.php +++ b/lam/templates/config/conflogin.php @@ -80,19 +80,7 @@ $tabindex = 1;
-
@@ -131,6 +119,7 @@ $tabindex = 1;
$box->add(new htmlResponsiveSelect('filename', $profiles, $selectedProfile, _('Profile name')), 12);
$passwordInput = new htmlResponsiveInputField(_('Password'), 'passwd', '', '200');
$passwordInput->setIsPassword(true);
+ $passwordInput->setCSSClasses(array('lam-initial-focus'));
$box->add($passwordInput, 12);
$box->addVerticalSpacer('1rem');
$button = new htmlButton('submit', _("Ok"));
diff --git a/lam/templates/config/conftypes.php b/lam/templates/config/conftypes.php
index 75a6d950..0830f75e 100644
--- a/lam/templates/config/conftypes.php
+++ b/lam/templates/config/conftypes.php
@@ -9,7 +9,6 @@ use \htmlButton;
use \htmlGroup;
use \htmlResponsiveInputCheckbox;
use \LAMConfig;
-use \htmlTableExtendedInputCheckbox;
use \htmlResponsiveRow;
use \htmlResponsiveInputField;
/*
diff --git a/lam/templates/config/mainlogin.php b/lam/templates/config/mainlogin.php
index 5f1f3860..d3a43899 100644
--- a/lam/templates/config/mainlogin.php
+++ b/lam/templates/config/mainlogin.php
@@ -72,15 +72,6 @@ printHeaderContents(_("Login"), '../..');
\n";
- echo "\n";
- echo "\n";
// include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName);
@@ -142,6 +133,7 @@ printHeaderContents(_("Login"), '../..');
$passwordField = new htmlInputField('passwd');
$passwordField->setFieldSize(15);
$passwordField->setIsPassword(true);
+ $passwordField->setCSSClasses(array('lam-initial-focus'));
$passwordGroup->addElement($passwordField);
$passwordGroup->addElement(new htmlHelpLink('236'));
$passwordDiv = new htmlDiv(null, $passwordGroup);
diff --git a/lam/templates/lib/500_lam.js b/lam/templates/lib/500_lam.js
index 197124d2..68ac75a0 100644
--- a/lam/templates/lib/500_lam.js
+++ b/lam/templates/lib/500_lam.js
@@ -866,10 +866,18 @@ window.lam.tools.activateTab = function() {
jQuery('.lam-active-tab').addClass('ui-tabs-active ui-state-active user-bright');
};
+/**
+ * Sets the focus on the initial field.
+ */
+window.lam.tools.setInitialFocus = function() {
+ jQuery('.lam-initial-focus').focus();
+};
+
jQuery(document).ready(function() {
window.lam.gui.equalHeight();
window.lam.form.autoTrim();
window.lam.account.addDefaultProfileListener();
window.lam.tools.addSavedSelectListener();
window.lam.tools.activateTab();
+ window.lam.tools.setInitialFocus();
});
diff --git a/lam/templates/login.php b/lam/templates/login.php
index 99a14cda..5a12114f 100644
--- a/lam/templates/login.php
+++ b/lam/templates/login.php
@@ -194,7 +194,7 @@ function display_LoginPage(LAMConfig $config_object, LAMCfgMain $cfgMain, $licen
printHeaderContents('LDAP Account Manager', '..');
?>
-
+
isEvaluationLicense()) {
StatusMessage('INFO', _('Evaluation Licence'));
}
-
- // set focus on password field
- if (!empty($config_object)) {
- echo "\n";
- }
?>
|