X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FNewpwdController.php;h=dc9ff5d46a11d263bcb5e80ada45d94c8989b06e;hb=d6940ce6e0ae4424d32efd66edc743d337dc3cf8;hp=5facb89771110c78a40a6712c28fe8108ee089fc;hpb=9efd079d59d269811abc4c551b2f39ab2e6a05fb;p=syj.git diff --git a/application/controllers/NewpwdController.php b/application/controllers/NewpwdController.php index 5facb89..dc9ff5d 100644 --- a/application/controllers/NewpwdController.php +++ b/application/controllers/NewpwdController.php @@ -6,11 +6,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->headScript()->appendFile('js/highlight.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/newpwd.css', 'all'); } public function indexAction() { @@ -25,7 +23,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'); @@ -45,7 +43,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(); } @@ -66,7 +64,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"), ); } }