diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 72c72252..b3f44ac8 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -1511,6 +1511,73 @@ function enforceUserIsLoggedIn($check2ndFactor = true) { } } +/** + * Prints the content of the header part. + * + * @param string $title page title + * @param string $prefix prefix to LAM main folder (e.g. "..") + */ +function printHeaderContents($title, $prefix) { + echo ''; + echo ''; + echo $title; + echo ''; + // include all CSS files + $cssDirName = dirname(__FILE__) . '/../style'; + $cssDir = dir($cssDirName); + $cssFiles = array(); + $cssEntry = $cssDir->read(); + while ($cssEntry !== false) { + if (substr($cssEntry, strlen($cssEntry) - 4, 4) == '.css') { + $cssFiles[] = $cssEntry; + } + $cssEntry = $cssDir->read(); + } + sort($cssFiles); + foreach ($cssFiles as $cssEntry) { + echo ""; + } + // include responsive CSS + $cssDirName = dirname(__FILE__) . '/../style/responsive'; + $cssDir = dir($cssDirName); + $cssFiles = array(); + $cssEntry = $cssDir->read(); + while ($cssEntry !== false) { + if (substr($cssEntry, strlen($cssEntry) - 4, 4) == '.css') { + $cssFiles[] = $cssEntry; + } + $cssEntry = $cssDir->read(); + } + sort($cssFiles); + foreach ($cssFiles as $cssEntry) { + echo ""; + } + echo ''; + echo ''; +} + +/** + * Prints script tags for all LAM JS files. + * + * @param string $prefix prefix to LAM main folder (e.g. "..") + */ +function printJsIncludes($prefix) { + $jsDirName = dirname(__FILE__) . '/../templates/lib'; + $jsDir = dir($jsDirName); + $jsFiles = array(); + $jsEntry = $jsDir->read(); + while ($jsEntry !== false) { + if (substr($jsEntry, strlen($jsEntry) - 3, 3) == '.js') { + $jsFiles[] = $jsEntry; + } + $jsEntry = $jsDir->read(); + } + sort($jsFiles); + foreach ($jsFiles as $jsEntry) { + echo "\n"; + } +} + class LAMException extends Exception { private $title; diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 06863229..1bcfe67f 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -338,7 +338,7 @@ function isAccountTypeHidden($type) { /** * Returns a list of all supported languages. * - * @return array languages + * @return LAMLanguage[] languages */ function getLanguages() { $languages = array(); diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index 0ac8ad3c..493e8eba 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -231,6 +231,10 @@ table.collapse { text-align: right; } +.text-center { + text-align: center; +} + .bold { font-weight: bold; } @@ -403,7 +407,7 @@ td.loginRightBox { box-shadow: 2px 2px 5px #a0a0a4; display: inline-block; background-color: white; - padding: 20px; + padding: 30px; } .limitWidth { diff --git a/lam/templates/config/conflogin.php b/lam/templates/config/conflogin.php index f4875bc9..6dd56feb 100644 --- a/lam/templates/config/conflogin.php +++ b/lam/templates/config/conflogin.php @@ -1,4 +1,15 @@ +printHeaderContents(_("Login"), '../..'); - - <?php - echo _("Login"); - ?> - - read(); - while ($cssEntry !== false) { - if (substr($cssEntry, strlen($cssEntry) - 4, 4) == '.css') { - $cssFiles[] = $cssEntry; - } - $cssEntry = $cssDir->read(); - } - sort($cssFiles); - foreach ($cssFiles as $cssEntry) { - echo "\n"; - } - ?> - - +if (sizeof($files) < 1) { + $message = new htmlStatusMessage('INFO', _("No server profiles found. Please create one.")); +} +$tabindex = 1; +?> - + read()) { - if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; - $jsFiles[] = $jsEntry; - } - sort($jsFiles); - foreach ($jsFiles as $jsEntry) { - echo "\n"; - } + printJsIncludes('../..'); // set focus on password field ?>