X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FNewpwdController.php;h=25a386217298c01bdbd63c7fcb84c7bb3fe921de;hb=0722c496ca63f30937427e3bf8fbdd5cfee2c83d;hp=2dc2724f8116ec7de20743012631589491555a43;hpb=190fd621df4920c56a422c03663874cddaa67d64;p=syj.git diff --git a/application/controllers/NewpwdController.php b/application/controllers/NewpwdController.php index 2dc2724..25a3862 100644 --- a/application/controllers/NewpwdController.php +++ b/application/controllers/NewpwdController.php @@ -1,15 +1,15 @@ 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->_helper->SyjMedias->addScripts('newpwd'); + $this->view->headLink()->appendStylesheet('css/generic.css', 'all'); + $this->view->headLink()->appendStylesheet('css/form.css', 'all'); + $this->view->headLink()->appendStylesheet('css/newpwd.css', 'all'); } public function indexAction() { @@ -24,7 +24,7 @@ class NewpwdController extends Zend_Controller_Action } if (empty($formData)) { - $loggeduser = $this->view->loggedUser(); + $loggeduser = $this->_helper->SyjUserManager->current(); if ($loggeduser) { $form->newpwd_email->setValue($loggeduser->email) ->setAttrib('readonly', 'true'); @@ -44,7 +44,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->SyjUserManager->current(); if ($loggeduser and ($loggeduser != $user)) { throw new Syj_Exception_Request(); } @@ -65,7 +65,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"), ); } }