X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FNewpwdController.php;h=17b16cae391391837a8615bbdbae5eedccf5aab2;hb=c06c7fd6e6f26d31abb8d7c9a9f9e3f2d5b27d5c;hp=012738c07045d765a865779abd367844d232bd8a;hpb=05ce9238adfa982746bfc6211b240fd24526af09;p=syj.git diff --git a/application/controllers/NewpwdController.php b/application/controllers/NewpwdController.php index 012738c..17b16ca 100644 --- a/application/controllers/NewpwdController.php +++ b/application/controllers/NewpwdController.php @@ -1,16 +1,13 @@ view->headScript()->appendFile('js/prototype.js'); - $this->view->headScript()->appendFile('js/newpwd.js'); - $this->view->headScript()->appendFile('js/utils.js'); - $this->view->headLink()->appendStylesheet('css/generic.css'); - $this->view->headLink()->appendStylesheet('css/newpwd.css'); + $this->_helper->SyjMedias->addScripts('newpwd'); + $this->_helper->SyjMedias->addStyleSheets('newpwd'); } public function indexAction() { @@ -25,7 +22,7 @@ class NewpwdController extends Zend_Controller_Action } if (empty($formData)) { - $loggeduser = $this->_helper->SyjSession->user(); + $loggeduser = $this->_helper->SyjUserManager->current(); if ($loggeduser) { $form->newpwd_email->setValue($loggeduser->email) ->setAttrib('readonly', 'true'); @@ -45,7 +42,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->_helper->SyjSession->user(); + $loggeduser = isset($loggeduser) ? $loggeduser: $this->_helper->SyjUserManager->current(); if ($loggeduser and ($loggeduser != $user)) { throw new Syj_Exception_Request(); } @@ -66,7 +63,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"), ); } }