This commit is contained in:
Michael RICOIS 2013-05-21 13:12:53 +00:00
parent 59265afff1
commit 678c46c683
2 changed files with 29 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class UserController extends Zend_Controller_Action {
public function loginAction()
{
$this->view->headTitle()->append('Connexion');
$form = new Form_Login();
$form = new Application_Form_Login();
$this->view->form = $form;
$request = $this->getRequest();
if ($request->isPost()) {

View File

@ -0,0 +1,28 @@
<?php
class Application_Form_Login extends Zend_Form {
public function init()
{
$this->setName('login');
$this->setAction('login');
$this->setMethod('post');
$this->addElement('text', 'login', array(
'filters' => array('StringTrim'),
'label' => 'Identifiant : ',
'required' => 'true',
)
);
$this->addElement('password', 'pass',
array(
'label' => 'Mot de passe : ',
'required' => 'true',
)
);
$this->addElement('submit', 'submit',
array(
'label' => 'Identification',
'ignore' => true,
));
}
}