Set autofocus on login username field
This commit is contained in:
parent
92f722452a
commit
a99bc26715
1 changed files with 11 additions and 13 deletions
|
@ -37,19 +37,17 @@ class Application_Form_Login extends Zend_Form
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add username element
|
// Add username element
|
||||||
$this->addElement('text', 'username', array(
|
$username = new Zend_Form_Element_Text("username");
|
||||||
'label' => _('Username:'),
|
$username->setLabel(_('Username:'))
|
||||||
|
->setAttribs(array(
|
||||||
|
'autofocus' => 'true',
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'required' => true,
|
'required' => 'true'))
|
||||||
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
|
->setValue((isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'')
|
||||||
'filters' => array('StringTrim'),
|
->addFilter('StringTrim')
|
||||||
'validators' => array(
|
->setDecorators(array('ViewHelper'))
|
||||||
'NotEmpty',
|
->setValidators(array('NotEmpty'));
|
||||||
),
|
$this->addElement($username);
|
||||||
'decorators' => array(
|
|
||||||
'ViewHelper'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
// Add password element
|
// Add password element
|
||||||
$this->addElement('password', 'password', array(
|
$this->addElement('password', 'password', array(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue