2 /* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3 and is published under the AGPL license. */
5 class Syj_Form_Login extends Syj_Form_TableAbstract
8 public function init() {
9 $user = array('Text', 'login_user', array( 'label' => __("user"), 'required' => true));
10 $pass = array('Password', 'login_password', array( 'label' => __("password")));
13 $this->setMainElements(array($user, $pass))
14 ->addElement('Hidden', 'login_geom_id', array( 'decorators' => array('ViewHelper')));
16 $currentUri = $this->getView()->UriPath(true);
17 $href = $this->getView()->addParamToUrl('newpwd', 'redirect', $currentUri, true);
19 $anchor = $this->getView()->Anchor($href,
20 $this->getTranslator()->translate("I forgot my password"),
21 array('id' => 'newpwd_control_anchor'));
23 $this->addElement('Submit', 'login_submit', array('label' => __("login"), 'description' => $anchor));
24 $decorator = $this->login_submit->getDecorator('Description');
25 $decorator->setOption('escape', false);