]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/ContactController.php
cache js, css and png files
[syj.git] / application / controllers / ContactController.php
index 03dd4a6b645436290fcf7fbc60c2dbb5c7d9edc6..7caf24e02cbf2349639fb0c8128709ef7c4c1840 100644 (file)
@@ -1,17 +1,13 @@
 <?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 ContactController extends Zend_Controller_Action
 {
 
     public function init() {
-        $this->view->headScript()->appendFile('js/prototype.js');
-        $this->view->headScript()->appendFile('js/forms.js');
-        $this->view->headScript()->appendFile('js/highlight.js');
-        $this->view->headScript()->appendFile('js/contact.js');
-        $this->view->headLink()->appendStylesheet('css/generic.css');
-        $this->view->headLink()->appendStylesheet('css/contact.css');
+        $this->_helper->SyjMedias->addScripts('contact');
+        $this->_helper->SyjMedias->addStyleSheets('contact');
         $this->view->headTitle($this->view->translate("contact form"));
     }
 
@@ -85,7 +81,7 @@ class ContactController extends Zend_Controller_Action
         }
 
         if (empty($formData)) {
-            $user = $this->view->loggedUser();
+            $user = $this->_helper->SyjUserManager->current();
             if ($user) {
                 $form->contact_email->setValue($user->email)
                                     ->setAttrib('readonly', 'true');
@@ -120,7 +116,7 @@ class ContactController extends Zend_Controller_Action
 
     protected function _jsLocaleStrings() {
         $this->view->jslocales = array(
-            'notEmptyField' => __("Value is required and can't be empty"),
+            'notEmptyField' => __("Value is required"),
             'invalidMail' => __("Invalid email"));
     }
 }