]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/NewpwdController.php
search a place with nominatim
[syj.git] / application / controllers / NewpwdController.php
index 2dc2724f8116ec7de20743012631589491555a43..de8ec3b644fcb9a242fc518fb253d94d411bbd41 100644 (file)
@@ -8,8 +8,9 @@ class NewpwdController extends Zend_Controller_Action
     public function init() {
         $this->view->headScript()->appendFile('js/prototype.js');
         $this->view->headScript()->appendFile('js/newpwd.js');
-        $this->view->headLink()->appendStylesheet('css/generic.css');
-        $this->view->headLink()->appendStylesheet('css/newpwd.css');
+        $this->view->headScript()->appendFile('js/utils.js');
+        $this->view->headLink()->appendStylesheet('css/generic.css', 'all');
+        $this->view->headLink()->appendStylesheet('css/newpwd.css', 'all');
     }
 
     public function indexAction() {
@@ -24,7 +25,7 @@ class NewpwdController extends Zend_Controller_Action
         }
 
         if (empty($formData)) {
-            $loggeduser = $this->view->loggedUser();
+            $loggeduser = $this->_helper->SyjSession->user();
             if ($loggeduser) {
                 $form->newpwd_email->setValue($loggeduser->email)
                                     ->setAttrib('readonly', 'true');
@@ -44,7 +45,7 @@ class NewpwdController extends Zend_Controller_Action
         $user = new Syj_Model_User();
         if ($userMapper->findByEmail($formData['newpwd_email'], $user)) {
             // if no user exist with posted email, pretend everything went correct
-            $loggeduser = isset($loggeduser) ? $loggeduser: $this->view->loggedUser();
+            $loggeduser = isset($loggeduser) ? $loggeduser: $this->_helper->SyjSession->user();
             if ($loggeduser and ($loggeduser != $user)) {
                 throw new Syj_Exception_Request();
             }
@@ -65,7 +66,7 @@ class NewpwdController extends Zend_Controller_Action
 
     protected function _jsLocaleStrings() {
         $this->view->jslocales = array(
-            'notEmptyField' => __("Value is required and can't be empty"),
+            'notEmptyField' => __("Value is required"),
             );
     }
 }