diff --git a/main/inc/lib/page.lib.php b/main/inc/lib/page.lib.php index 6c226ed0db..57a066262f 100644 --- a/main/inc/lib/page.lib.php +++ b/main/inc/lib/page.lib.php @@ -334,12 +334,11 @@ class PageController $form = new FormValidator('formLogin', 'POST', null, null, array('class' => 'form-vertical')); // 'placeholder'=>get_lang('UserName') //'autocomplete'=>"off", - $form->addElement( 'text', 'login', get_lang('UserName'), - array('class' => 'span2 autocapitalize_off', 'autofocus' => 'autofocus') + array('class' => 'span2 autocapitalize_off', 'autofocus' => 'autofocus', 'icon' => 'fa fa-key fa-fw') ); $form->addElement('password', 'password', get_lang('Pass'), array('class' => 'span2')); $form->addElement('style_submit_button', 'submitAuth', get_lang('LoginEnter'), array('class' => 'btn')); diff --git a/main/inc/lib/pear/HTML/Common.php b/main/inc/lib/pear/HTML/Common.php index 74f068a0f5..3e33bb6fd1 100644 --- a/main/inc/lib/pear/HTML/Common.php +++ b/main/inc/lib/pear/HTML/Common.php @@ -126,7 +126,7 @@ class HTML_Common function _getTabs() { return str_repeat($this->_getTab(), $this->_tabOffset); - } // end func _getTabs + } /** * Returns an HTML formatted attribute string @@ -471,4 +471,4 @@ class HTML_Common return $charset; } // end func charset } // end class HTML_Common -?> \ No newline at end of file +?> diff --git a/main/inc/lib/pear/HTML/QuickForm/input.php b/main/inc/lib/pear/HTML/QuickForm/input.php index bb5578e946..04c4775165 100755 --- a/main/inc/lib/pear/HTML/QuickForm/input.php +++ b/main/inc/lib/pear/HTML/QuickForm/input.php @@ -1,45 +1,46 @@ form elements - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.01 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_01.txt If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category HTML - * @package HTML_QuickForm - * @author Adam Daniel - * @author Bertrand Mansion - * @copyright 2001-2009 The PHP Group - * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: input.php,v 1.10 2009/04/04 21:34:03 avb Exp $ - * @link http://pear.php.net/package/HTML_QuickForm - */ - -/** - * Base class for form elements - */ -require_once 'HTML/QuickForm/element.php'; +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** - * Base class for form elements + * Base class for form elements * - * @category HTML - * @package HTML_QuickForm - * @author Adam Daniel - * @author Bertrand Mansion - * @version Release: 3.2.11 - * @since 1.0 + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.01 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_01.txt If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category HTML + * @package HTML_QuickForm + * @author Adam Daniel + * @author Bertrand Mansion + * @copyright 2001-2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version CVS: $Id: input.php,v 1.10 2009/04/04 21:34:03 avb Exp $ + * @link http://pear.php.net/package/HTML_QuickForm + */ + +/** + * Base class for form elements + */ +require_once 'HTML/QuickForm/element.php'; + +/** + * Base class for form elements + * + * @category HTML + * @package HTML_QuickForm + * @author Adam Daniel + * @author Bertrand Mansion + * @version Release: 3.2.11 + * @since 1.0 * @abstract */ class HTML_QuickForm_input extends HTML_QuickForm_element { + public $icon; // {{{ constructor /** @@ -52,13 +53,14 @@ class HTML_QuickForm_input extends HTML_QuickForm_element * @access public * @return void */ - function HTML_QuickForm_input($elementName=null, $elementLabel=null, $attributes=null) + function HTML_QuickForm_input($elementName = null, $elementLabel = null, $attributes = null) { $this->HTML_QuickForm_element($elementName, $elementLabel, $attributes); - } //end constructor - // }}} - // {{{ setType() + if (isset($attributes) && is_array($attributes) && !empty($attributes['icon'])) { + $this->icon = $attributes['icon']; + } + } /** * Sets the element type @@ -72,10 +74,7 @@ class HTML_QuickForm_input extends HTML_QuickForm_element { $this->_type = $type; $this->updateAttributes(array('type'=>$type)); - } // end func setType - - // }}} - // {{{ setName() + } /** * Sets the input field name @@ -151,7 +150,15 @@ class HTML_QuickForm_input extends HTML_QuickForm_element if ($this->_flagFrozen) { return $this->getFrozenHtml(); } else { - return $this->_getTabs() . '_getAttrString($this->_attributes) . ' />'; + $html = null; + if (!empty($this->icon)) { + $html .= '
'; + } + $html .= $this->_getTabs().'_getAttrString($this->_attributes).' />'; + if (!empty($this->icon)) { + $html .= '
'; + } + return $html; } } //end func toHtml @@ -163,7 +170,7 @@ class HTML_QuickForm_input extends HTML_QuickForm_element * * @param string $event Name of event * @param mixed $arg event arguments - * @param object &$caller calling object + * @param object &$caller calling object * @since 1.0 * @access public * @return void diff --git a/main/inc/lib/pear/HTML/QuickForm/text.php b/main/inc/lib/pear/HTML/QuickForm/text.php index 34de29fa69..434f87f9e5 100755 --- a/main/inc/lib/pear/HTML/QuickForm/text.php +++ b/main/inc/lib/pear/HTML/QuickForm/text.php @@ -40,8 +40,6 @@ require_once 'HTML/QuickForm/input.php'; class HTML_QuickForm_text extends HTML_QuickForm_input { - // {{{ constructor - /** * Class constructor * @@ -62,7 +60,6 @@ class HTML_QuickForm_text extends HTML_QuickForm_input $attributes = array('class' => 'form-control'); } } - HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes); $this->_persistantFreeze = true; $this->setType('text'); diff --git a/src/ChamiloLMS/Controller/IndexController.php b/src/ChamiloLMS/Controller/IndexController.php index 8ede37475d..4262e3c029 100644 --- a/src/ChamiloLMS/Controller/IndexController.php +++ b/src/ChamiloLMS/Controller/IndexController.php @@ -236,7 +236,8 @@ class IndexController extends CommonController array( 'class' => 'input-medium autocapitalize_off virtualkey', 'placeholder' => get_lang('UserName'), - 'autofocus' => 'autofocus' + 'autofocus' => 'autofocus', + 'icon' => 'fa fa-user fa-fw' ) ); $form->addElement( @@ -245,7 +246,8 @@ class IndexController extends CommonController null, array( 'placeholder' => get_lang('Pass'), - 'class' => 'input-medium virtualkey' + 'class' => 'input-medium virtualkey', + 'icon' => 'fa fa-key fa-fw' ) ); $form->addElement('style_submit_button', 'submitAuth', get_lang('LoginEnter'), array('class' => 'btn btn-primary btn-block')); diff --git a/web/ChamiloLMS/css/base.css b/web/ChamiloLMS/css/base.css index d8a839c4c6..ccc4b80b87 100644 --- a/web/ChamiloLMS/css/base.css +++ b/web/ChamiloLMS/css/base.css @@ -4844,9 +4844,11 @@ i.size-32.icon-new-work { padding: 15px; margin: 0 auto; } +.form-signin-block button { + margin-top: 10px; +} .form-signin-block input[type="password"] { - margin-bottom: 10px; border-top-left-radius: 0; border-top-right-radius: 0; } @@ -4857,7 +4859,6 @@ i.size-32.icon-new-work { border-bottom-right-radius: 0; } - .form-signin { max-width: 330px; padding: 15px;