]> dev.renevier.net Git - syj.git/blobdiff - application/forms/Login.php
remember me checkbox for login
[syj.git] / application / forms / Login.php
index b42f8ba0ae6c23de878428dba013f4523cc9363f..33fdfe7a39efdc6560a2b549ced0115278f7cc75 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
+/*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
     and is published under the AGPL license. */
 
 class Syj_Form_Login extends Syj_Form_TableAbstract
@@ -9,14 +9,11 @@ class Syj_Form_Login extends Syj_Form_TableAbstract
         $user = array('Text', 'login_user', array( 'label' => __("user"), 'required' => true));
         $pass = array('Password', 'login_password', array( 'label' => __("password")));
 
-
         $this->setMainElements(array($user, $pass))
+             ->addElement('Checkbox', 'login_rememberme', array( 'label' => __("remember me"), 'checked' => true))
              ->addElement('Hidden', 'login_geom_id', array( 'decorators' => array('ViewHelper')));
 
-        $currentUri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
-        if (strpos($currentUri, '?') !== false) {
-            $currentUri = strstr($currentUri, '?', true);
-        }
+        $currentUri = $this->getView()->UriPath(true);
         $href = $this->getView()->addParamToUrl('newpwd', 'redirect', $currentUri, true);
 
         $anchor = $this->getView()->Anchor($href,