From 16b7ba4fc59ef84b3c1facdee5b07c14a458bcfe Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Thu, 29 Dec 2011 12:59:20 +0100 Subject: [PATCH] Force a back end user to change his password upon the next login (see #2928) --- CHANGELOG.md | 3 + contao/index.php | 2 +- contao/install.php | 10 +- contao/main.php | 10 +- contao/password.php | 154 ++++++++++++++++++ system/libraries/System.php | 5 +- system/modules/backend/config/database.sql | 1 + system/modules/backend/dca/tl_user.php | 18 +- .../modules/backend/languages/de/default.php | 3 +- .../modules/backend/languages/de/tl_user.php | 1 + .../modules/backend/languages/en/default.php | 3 +- .../modules/backend/languages/en/tl_user.php | 1 + .../backend/templates/be_password.html5 | 87 ++++++++++ system/themes/default/login.css | 2 +- system/themes/default/src/login.css | 8 +- 15 files changed, 289 insertions(+), 19 deletions(-) create mode 100644 contao/password.php create mode 100644 system/modules/backend/templates/be_password.html5 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d645cc5ef..89dc1ef4f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Contao Open Source CMS Changelog Version 2.11.RC1 (XXXX-XX-XX) ----------------------------- +### New +Force a back end user to change his password upon the next login (see #2928). + ### Changed Make the user agent and OS list in the `Environment` class editable (see #3410). diff --git a/contao/index.php b/contao/index.php index f5e402506b..4989d008e6 100644 --- a/contao/index.php +++ b/contao/index.php @@ -61,7 +61,7 @@ public function __construct() // Redirect to the install tool if (!Config::getInstance()->isComplete()) { - $this->redirect('install.php'); + $this->redirect('contao/install.php'); } $this->import('BackendUser', 'User'); diff --git a/contao/install.php b/contao/install.php index 287ca1f134..82c0fe63e4 100644 --- a/contao/install.php +++ b/contao/install.php @@ -831,20 +831,22 @@ public function run() { $this->Template->adminError = $GLOBALS['TL_LANG']['ERR']['extnd']; } - // Passwords do not match elseif ($this->Input->post('pass') != $this->Input->post('confirm_pass')) { $this->Template->adminError = $GLOBALS['TL_LANG']['ERR']['passwordMatch']; } - // Password too short elseif (utf8_strlen($this->Input->post('pass')) < $GLOBALS['TL_CONFIG']['minPasswordLength']) { $this->Template->adminError = sprintf($GLOBALS['TL_LANG']['ERR']['passwordLength'], $GLOBALS['TL_CONFIG']['minPasswordLength']); } - - // Save data + // Password and username are the same + elseif ($this->Input->post('pass') == $this->Input->post('username')) + { + $this->Template->adminError = $GLOBALS['TL_LANG']['ERR']['passwordName']; + } + // Save the data elseif ($this->Input->post('name') != '' && $this->Input->post('email', true) != '' && $this->Input->post('username') != '') { $strSalt = substr(md5(uniqid(mt_rand(), true)), 0, 23); diff --git a/contao/main.php b/contao/main.php index 48072f478a..57c2bddac9 100644 --- a/contao/main.php +++ b/contao/main.php @@ -68,7 +68,7 @@ public function __construct() // Redirect to the install tool if (!Config::getInstance()->isComplete()) { - $this->redirect('install.php'); + $this->redirect('contao/install.php'); } $this->import('BackendUser', 'User'); @@ -76,6 +76,12 @@ public function __construct() $this->User->authenticate(); + // Password change required + if ($this->User->pwChange) + { + $this->redirect('contao/password.php'); + } + $this->loadLanguageFile('default'); $this->loadLanguageFile('modules'); } @@ -137,7 +143,7 @@ protected function welcomeScreen() } } - $objTemplate->messages = implode("\n", $arrMessages); + $objTemplate->messages = $this->getMessages(false, true) . "\n" . implode("\n", $arrMessages); $objTemplate->arrGroups = $this->User->navigation(true); $objTemplate->welcome = sprintf($GLOBALS['TL_LANG']['MSC']['welcomeTo'], $GLOBALS['TL_CONFIG']['websiteTitle']); $objTemplate->systemMessages = $GLOBALS['TL_LANG']['MSC']['systemMessages']; diff --git a/contao/password.php b/contao/password.php new file mode 100644 index 0000000000..66aa8bf211 --- /dev/null +++ b/contao/password.php @@ -0,0 +1,154 @@ +. + * + * PHP version 5 + * @copyright Leo Feyer 2005-2011 + * @author Leo Feyer + * @package Backend + * @license LGPL + * @filesource + */ + + +/** + * Initialize the system + */ +define('TL_MODE', 'BE'); +require_once('../system/initialize.php'); + + +/** + * Class Index + * + * Provides a form to change the back end password. + * @copyright Leo Feyer 2011 + * @author Leo Feyer + * @package Controller + */ +class Index extends Backend +{ + + /** + * Initialize the controller + * + * 1. Import the user + * 2. Call the parent constructor + * 3. Authenticate the user + * 4. Load the language files + * DO NOT CHANGE THIS ORDER! + */ + public function __construct() + { + $this->import('BackendUser', 'User'); + parent::__construct(); + + $this->User->authenticate(); + + $this->loadLanguageFile('default'); + $this->loadLanguageFile('modules'); + } + + + /** + * Run the controller and parse the password template + */ + public function run() + { + $this->Template = new BackendTemplate('be_password'); + + if ($this->Input->post('FORM_SUBMIT') == 'tl_password') + { + $pw = $this->Input->post('password'); + $cnf = $this->Input->post('confirm'); + + // Do not allow special characters + if (preg_match('/[#\(\)\/<=>]/', html_entity_decode($this->Input->post('password')))) + { + $this->addErrorMessage($GLOBALS['TL_LANG']['ERR']['extnd']); + } + // Passwords do not match + elseif ($pw != $cnf) + { + $this->addErrorMessage($GLOBALS['TL_LANG']['ERR']['passwordMatch']); + } + // Password too short + elseif (utf8_strlen($pw) < $GLOBALS['TL_CONFIG']['minPasswordLength']) + { + $this->addErrorMessage(sprintf($GLOBALS['TL_LANG']['ERR']['passwordLength'], $GLOBALS['TL_CONFIG']['minPasswordLength'])); + } + // Password and username are the same + elseif ($pw == $this->User->username) + { + $this->addErrorMessage($GLOBALS['TL_LANG']['ERR']['passwordName']); + } + // Save the data + else + { + list(, $strSalt) = explode(':', $this->User->password); + $strPassword = sha1($strSalt . $pw); + + // Make sure the password has been changed + if ($strPassword . ':' . $strSalt == $this->User->password) + { + $this->addErrorMessage($GLOBALS['TL_LANG']['MSC']['pw_change']); + } + else + { + $strSalt = substr(md5(uniqid(mt_rand(), true)), 0, 23); + $strPassword = sha1($strSalt . $pw); + + $this->Database->prepare("UPDATE tl_user SET password=?, pwChange='' WHERE id=?") + ->execute($strPassword . ':' . $strSalt, $this->User->id); + + $this->addConfirmationMessage($GLOBALS['TL_LANG']['MSC']['pw_changed']); + $this->redirect('contao/main.php'); + } + } + + $this->reload(); + } + + $this->Template->theme = $this->getTheme(); + $this->Template->messages = $this->getMessages(); + $this->Template->base = $this->Environment->base; + $this->Template->language = $GLOBALS['TL_LANGUAGE']; + $this->Template->title = $GLOBALS['TL_CONFIG']['websiteTitle']; + $this->Template->charset = $GLOBALS['TL_CONFIG']['characterSet']; + $this->Template->action = ampersand($this->Environment->request); + $this->Template->headline = $GLOBALS['TL_LANG']['MSC']['pw_change']; + $this->Template->submitButton = specialchars($GLOBALS['TL_LANG']['MSC']['continue']); + $this->Template->password = $GLOBALS['TL_LANG']['MSC']['password'][0]; + $this->Template->confirm = $GLOBALS['TL_LANG']['MSC']['confirm'][0]; + $this->Template->disableCron = $GLOBALS['TL_CONFIG']['disableCron']; + + $this->Template->output(); + } +} + + +/** + * Instantiate the controller + */ +$objIndex = new Index(); +$objIndex->run(); + +?> \ No newline at end of file diff --git a/system/libraries/System.php b/system/libraries/System.php index 3e29b5ac2c..21a18a3e79 100644 --- a/system/libraries/System.php +++ b/system/libraries/System.php @@ -594,9 +594,10 @@ protected function addMessage($strMessage, $strType) /** * Return all messages as HTML * @param boolean + * @param boolean * @return string */ - protected function getMessages($blnDcLayout=false) + protected function getMessages($blnDcLayout=false, $blnNoWrapper=false) { $strMessages = ''; @@ -632,7 +633,7 @@ protected function getMessages($blnDcLayout=false) $strMessages = trim($strMessages); // Wrapping container - if ($strMessages != '') + if (!$blnNoWrapper && $strMessages != '') { $strMessages = sprintf('%s
%s%s%s
%s', ($blnDcLayout ? "\n\n" : "\n"), "\n", $strMessages, "\n", ($blnDcLayout ? '' : "\n")); } diff --git a/system/modules/backend/config/database.sql b/system/modules/backend/config/database.sql index b498d0f5f1..53d94153dd 100644 --- a/system/modules/backend/config/database.sql +++ b/system/modules/backend/config/database.sql @@ -668,6 +668,7 @@ CREATE TABLE `tl_user` ( `dateAdded` int(10) unsigned NOT NULL default '0', `currentLogin` int(10) unsigned NOT NULL default '0', `lastLogin` int(10) unsigned NOT NULL default '0', + `pwChange` char(1) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`), KEY `email` (`email`) diff --git a/system/modules/backend/dca/tl_user.php b/system/modules/backend/dca/tl_user.php index 00a869440f..77c92b2b9d 100644 --- a/system/modules/backend/dca/tl_user.php +++ b/system/modules/backend/dca/tl_user.php @@ -128,11 +128,11 @@ ( '__selector__' => array('inherit', 'admin'), 'login' => '{name_legend},name,email;{backend_legend},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{session_legend},session;{password_legend},password', - 'admin' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password;{admin_legend},admin;{account_legend},disable,start,stop', - 'default' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', - 'group' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', - 'extend' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{forms_legend},forms,formp;{account_legend},disable,start,stop', - 'custom' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{forms_legend},forms,formp;{account_legend},disable,start,stop' + 'admin' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password,pwChange;{admin_legend},admin;{account_legend},disable,start,stop', + 'default' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password,pwChange;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', + 'group' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password,pwChange;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', + 'extend' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password,pwChange;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{forms_legend},forms,formp;{account_legend},disable,start,stop', + 'custom' => '{name_legend},username,name,email;{backend_legend:hide},language,backendTheme,showHelp,thumbnails,useRTE,useCE,fancyUpload;{password_legend:hide},password,pwChange;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{forms_legend},forms,formp;{account_legend},disable,start,stop' ), // Fields @@ -231,6 +231,14 @@ 'inputType' => 'password', 'eval' => array('mandatory'=>true, 'rgxp'=>'extnd', 'minlength'=>$GLOBALS['TL_CONFIG']['minPasswordLength']) ), + 'pwChange' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_user']['pwChange'], + 'exclude' => true, + 'inputType' => 'checkbox', + 'filter' => true, + 'eval' => array('tl_class'=>'clr') + ), 'admin' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_user']['admin'], diff --git a/system/modules/backend/languages/de/default.php b/system/modules/backend/languages/de/default.php index 9268113e96..cf075bd284 100644 --- a/system/modules/backend/languages/de/default.php +++ b/system/modules/backend/languages/de/default.php @@ -43,7 +43,7 @@ $GLOBALS['TL_LANG']['ERR']['alpha'] = 'Bitte geben Sie nur Buchstaben ein!'; $GLOBALS['TL_LANG']['ERR']['alnum'] = 'Bitte geben Sie nur Buchstaben und Zahlen ein!'; $GLOBALS['TL_LANG']['ERR']['phone'] = 'Bitte geben Sie eine gültige Telefonnummer ein!'; -$GLOBALS['TL_LANG']['ERR']['extnd'] = 'Aus Sicherheitsgründen können Sie diese Zeichen (=<>&/()#) hier nicht verwenden!'; +$GLOBALS['TL_LANG']['ERR']['extnd'] = 'Aus Sicherheitsgründen können Sie folgende Zeichen hier nicht verwenden: =<>&/()#'; $GLOBALS['TL_LANG']['ERR']['email'] = 'Bitte geben Sie eine gültige E-Mail-Adresse ein!'; $GLOBALS['TL_LANG']['ERR']['emails'] = 'Mindestens eine der E-Mail-Adressen ist ungültig!'; $GLOBALS['TL_LANG']['ERR']['url'] = 'Bitte geben Sie ein gültiges URL-Format ein und kodieren Sie Sonderzeichen!'; @@ -361,6 +361,7 @@ $GLOBALS['TL_LANG']['MSC']['continue'] = 'Weiter'; $GLOBALS['TL_LANG']['MSC']['skipNavigation'] = 'Navigation überspringen'; $GLOBALS['TL_LANG']['MSC']['selectAll'] = 'Alle auswählen'; +$GLOBALS['TL_LANG']['MSC']['pw_change'] = 'Bitte geben Sie ein neues Passwort ein'; $GLOBALS['TL_LANG']['MSC']['pw_changed'] = 'Das Passwort wurde aktualisiert.'; $GLOBALS['TL_LANG']['MSC']['fallback'] = 'Standard'; $GLOBALS['TL_LANG']['MSC']['view'] = 'In einem neuen Fenster ansehen'; diff --git a/system/modules/backend/languages/de/tl_user.php b/system/modules/backend/languages/de/tl_user.php index aebfe643f5..4bab81f76d 100644 --- a/system/modules/backend/languages/de/tl_user.php +++ b/system/modules/backend/languages/de/tl_user.php @@ -42,6 +42,7 @@ $GLOBALS['TL_LANG']['tl_user']['useRTE'] = array('Rich Text Editor verwenden', 'Den Rich Text Editor zur Textformatierung verwenden.'); $GLOBALS['TL_LANG']['tl_user']['useCE'] = array('Code-Editor verwenden', 'Den Code-Editor zur Bearbeitung von Code-Elementen verwenden.'); $GLOBALS['TL_LANG']['tl_user']['fancyUpload'] = array('FancyUpload aktivieren', 'Falls FancyUpload in Ihrem Browser nicht fehlerfrei läuft, können Sie das Skript hier deaktivieren.'); +$GLOBALS['TL_LANG']['tl_user']['pwChange'] = array('Passwort-Änderung notwendig', 'Zwingt den Benutzer, sein Passwort bei der nächsten Anmeldung zu ändern.'); $GLOBALS['TL_LANG']['tl_user']['admin'] = array('Zum Administrator machen', 'Administratoren haben uneingeschränkten Zugriff auf alle Module und Elemente!'); $GLOBALS['TL_LANG']['tl_user']['groups'] = array('Benutzergruppen', 'Hier können Sie den Benutzer einer oder mehreren Gruppen zuweisen.'); $GLOBALS['TL_LANG']['tl_user']['inherit'] = array('Rechtevererbung', 'Hier können Sie festlegen, welche Gruppenrechte der Benutzer erbt.'); diff --git a/system/modules/backend/languages/en/default.php b/system/modules/backend/languages/en/default.php index 3229946ba4..78486076a0 100644 --- a/system/modules/backend/languages/en/default.php +++ b/system/modules/backend/languages/en/default.php @@ -43,7 +43,7 @@ $GLOBALS['TL_LANG']['ERR']['alpha'] = 'Please enter alphabetic characters only!'; $GLOBALS['TL_LANG']['ERR']['alnum'] = 'Please enter alphanumeric characters only!'; $GLOBALS['TL_LANG']['ERR']['phone'] = 'Please enter a valid phone number!'; -$GLOBALS['TL_LANG']['ERR']['extnd'] = 'For security reasons you can not use these characters (=<>&/()#) here!'; +$GLOBALS['TL_LANG']['ERR']['extnd'] = 'For security reasons you can not use the following characters here: =<>&/()#'; $GLOBALS['TL_LANG']['ERR']['email'] = 'Please enter a valid e-mail address!'; $GLOBALS['TL_LANG']['ERR']['emails'] = 'There is at least one invalid e-mail address!'; $GLOBALS['TL_LANG']['ERR']['url'] = 'Please enter a valid URL format and encode special characters!'; @@ -361,6 +361,7 @@ $GLOBALS['TL_LANG']['MSC']['continue'] = 'Continue'; $GLOBALS['TL_LANG']['MSC']['skipNavigation'] = 'Skip navigation'; $GLOBALS['TL_LANG']['MSC']['selectAll'] = 'Select all'; +$GLOBALS['TL_LANG']['MSC']['pw_change'] = 'Please enter a new password'; $GLOBALS['TL_LANG']['MSC']['pw_changed'] = 'The password has been updated.'; $GLOBALS['TL_LANG']['MSC']['fallback'] = 'default'; $GLOBALS['TL_LANG']['MSC']['view'] = 'View in a new window'; diff --git a/system/modules/backend/languages/en/tl_user.php b/system/modules/backend/languages/en/tl_user.php index 50f6e76008..3ad083e6e5 100644 --- a/system/modules/backend/languages/en/tl_user.php +++ b/system/modules/backend/languages/en/tl_user.php @@ -42,6 +42,7 @@ $GLOBALS['TL_LANG']['tl_user']['useRTE'] = array('Enable the rich text editor', 'Use the rich text editor to format text elements.'); $GLOBALS['TL_LANG']['tl_user']['useCE'] = array('Enable the code editor', 'Use the code editor to modify code elements.'); $GLOBALS['TL_LANG']['tl_user']['fancyUpload'] = array('Use FancyUpload', 'If FancyUpload does not work properly in your web browser, you can deactivate the script here.'); +$GLOBALS['TL_LANG']['tl_user']['pwChange'] = array('Password change required', 'Make the user change his password upon the next login.'); $GLOBALS['TL_LANG']['tl_user']['admin'] = array('Make the user an administrator', 'Administrators have unlimited access to all modules and elements!'); $GLOBALS['TL_LANG']['tl_user']['groups'] = array('User groups', 'Here you can assign the user to one or more groups.'); $GLOBALS['TL_LANG']['tl_user']['inherit'] = array('Permission inheritance', 'Here you can define which group permissions the user inherits.'); diff --git a/system/modules/backend/templates/be_password.html5 b/system/modules/backend/templates/be_password.html5 new file mode 100644 index 0000000000..d0d1582562 --- /dev/null +++ b/system/modules/backend/templates/be_password.html5 @@ -0,0 +1,87 @@ + + + + +<?php echo $this->title; ?> - Contao Open Source CMS <?php echo VERSION; ?> + + + + + + + + + + + +
+
+ +

headline; ?>

+ + + +
+ +
+ + +disableCron): ?> + + + + + + \ No newline at end of file diff --git a/system/themes/default/login.css b/system/themes/default/login.css index a90c954c5c..de10096308 100644 --- a/system/themes/default/login.css +++ b/system/themes/default/login.css @@ -1,2 +1,2 @@ /* Contao Open Source CMS :: Copyright (C) 2005-2011 Leo Feyer :: LGPL license */ -body{background:#f5f5f5 url("images/hbg.jpg") repeat-x}#header{width:516px;margin:18px auto 0;padding:1px;background:#fff;border:1px solid #bbb;border-bottom:0}#header h1{margin:0;padding:2px 0 4px 6px;background:#b3b6b3 url("images/headline.gif") repeat-x;color:#fff}#container{width:520px;margin:0 auto;padding:0}#main{width:516px;padding:1px;background:#fff;border:1px solid #bbb;border-top:0}#container h2{margin:18px;padding:6px 0 8px 40px;background:url("images/logo.gif") no-repeat left center;font-size:14px;color:#8ab858}#go_to_frontend{margin:-6px 18px 12px 0;padding:0;text-align:right}#go_to_frontend a{padding:2px 0 3px 20px;background:url("images/login.gif") no-repeat left center;color:#bbb}#tl_license{margin:18px 18px 0}#tl_license p{line-height:15px;text-align:justify}#tl_license p,#tl_license a{color:#888b88}#tl_license a:hover,#tl_license a:focus,#tl_license a:active{color:#8ab858}.login_error{margin:1px 0 0;padding:2px 0 3px 20px;background:url("images/error.gif") no-repeat left center}.login_error label{color:#c55}.tl_error,.tl_info{margin:0 0 12px;padding:2px 0 3px 20px}.tl_error{color:#c55;background:url("images/error.gif") no-repeat left center}.tl_info{color:#5c9ac9;background:url("images/show.gif") no-repeat 1px center}.tl_login_form{width:350px;margin:18px auto 24px}.tl_login_form .formbody{padding-top:6px}.tl_login_table{width:100%;margin:0 0 6px}.tl_login_submit_container{padding-top:0;text-align:right}.tl_text{width:174px}.tl_select{width:180px} \ No newline at end of file +body{background:#f5f5f5 url("images/hbg.jpg") repeat-x}#header{width:516px;margin:10% auto 0;padding:1px;background:#fff;border:1px solid #bbb;border-bottom:0}#header h1{margin:0;padding:2px 0 4px 6px;background:#b3b6b3 url("images/headline.gif") repeat-x;color:#fff}#container{width:520px;margin:0 auto;padding:0}#main{width:516px;padding:1px;background:#fff;border:1px solid #bbb;border-top:0}#container h2{margin:18px;padding:6px 0 8px 40px;background:url("images/logo.gif") no-repeat left center;font-size:14px;color:#8ab858}#go_to_frontend{margin:-6px 18px 12px 0;padding:0;text-align:right}#go_to_frontend a{padding:2px 0 3px 20px;background:url("images/login.gif") no-repeat left center;color:#bbb}#tl_license{margin:18px 18px 0}#tl_license p{line-height:15px;text-align:justify}#tl_license p,#tl_license a{color:#888b88}#tl_license a:hover,#tl_license a:focus,#tl_license a:active{color:#8ab858}.login_error{margin:1px 0 0;padding:2px 0 3px 20px;background:url("images/error.gif") no-repeat left center}.login_error label{color:#c55}.tl_error,.tl_info,.tl_confirm{margin:0 0 12px;padding:2px 0 3px 20px}.tl_error{color:#c55;background:url("images/error.gif") no-repeat left center}.tl_info{color:#5c9ac9;background:url("images/show.gif") no-repeat 1px center}.tl_confirm{color:#8ab858;background:url("images/ok.gif") no-repeat left center}.tl_login_form{width:350px;margin:18px auto 24px}.tl_login_form .formbody{padding-top:6px}.tl_login_table{width:100%;margin:0 0 6px}.tl_login_submit_container{padding-top:0;text-align:right}.tl_text{width:174px}.tl_select{width:180px} \ No newline at end of file diff --git a/system/themes/default/src/login.css b/system/themes/default/src/login.css index 6ce3392d1d..1430ab61a6 100644 --- a/system/themes/default/src/login.css +++ b/system/themes/default/src/login.css @@ -34,7 +34,7 @@ body { /* Header */ #header { width:516px; - margin:18px auto 0; + margin:10% auto 0; padding:1px; background:#fff; border:1px solid #bbb; @@ -108,7 +108,7 @@ body { .login_error label { color:#c55; } -.tl_error,.tl_info { +.tl_error,.tl_info,.tl_confirm { margin:0 0 12px; padding:2px 0 3px 20px; } @@ -120,6 +120,10 @@ body { color:#5c9ac9; background:url("images/show.gif") no-repeat 1px center; } +.tl_confirm { + color:#8ab858; + background:url("images/ok.gif") no-repeat left center; +} /* Login form */ .tl_login_form {