<?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 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->_helper->SyjMedias->addStyleSheets('newpwd');
}
public function indexAction() {
}
if (empty($formData)) {
- $loggeduser = $this->view->loggedUser();
+ $loggeduser = $this->_helper->SyjUserManager->current();
if ($loggeduser) {
$form->newpwd_email->setValue($loggeduser->email)
->setAttrib('readonly', 'true');
$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();
}
protected function _jsLocaleStrings() {
$this->view->jslocales = array(
- 'notEmptyField' => __("Value is required and can't be empty"),
+ 'notEmptyField' => __("Value is required"),
);
}
}