]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/ContactController.php
some style for forms
[syj.git] / application / controllers / ContactController.php
index 0b71c325151f1647fc54106708af28bca7144e49..ef568393d60514b99eb0d4a6aba20cf330456f09 100644 (file)
@@ -6,11 +6,10 @@ 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/contact.js');
-        $this->view->headLink()->appendStylesheet('css/generic.css');
-        $this->view->headLink()->appendStylesheet('css/contact.css');
+        $this->_helper->SyjMedias->addScripts('contact');
+        $this->view->headLink()->appendStylesheet('css/generic.css', 'all');
+        $this->view->headLink()->appendStylesheet('css/form.css', 'all');
+        $this->view->headLink()->appendStylesheet('css/contact.css', 'all');
         $this->view->headTitle($this->view->translate("contact form"));
     }
 
@@ -84,7 +83,7 @@ class ContactController extends Zend_Controller_Action
         }
 
         if (empty($formData)) {
-            $user = $this->view->loggedUser();
+            $user = $this->_helper->SyjSession->user();
             if ($user) {
                 $form->contact_email->setValue($user->email)
                                     ->setAttrib('readonly', 'true');
@@ -119,7 +118,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"));
     }
 }