Exemple #1
0
 public function contactAction()
 {
     $form = new Www_Form_Contact();
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($_POST)) {
             $values = $form->getValues();
             try {
                 Yadda_Model_Contact::send($values['name'], $values['email'], $values['comments']);
                 $this->getHelper('FlashMessenger')->addMessage('Thanks for your comments! We\'ll get back to you shortly.');
                 $this->_redirect($this->view->url(array(), 'contact'));
             } catch (Yadda_Model_Exception $e) {
                 $this->view->flashMessages[] = $e->getMessage();
             }
         }
     }
     $this->view->form = $form;
     $this->view->headTitle('yadda. - Contact us', 'SET');
     $this->view->headLink()->appendStylesheet('/css/index/contact.css');
 }
Exemple #2
0
 public function contactAction()
 {
     $form = new M_Form_Contact();
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($_POST)) {
             $values = $form->getValues();
             try {
                 Yadda_Model_Contact::send($values['name'], $values['email'], $values['comments']);
                 $this->getHelper('FlashMessenger')->addMessage('Thanks for your comments! We\'ll get back to you shortly.');
                 $this->_redirect($this->view->url(array(), 'contact'));
             } catch (Yadda_Model_Exception $e) {
                 $this->view->flashMessages[] = $e->getMessage();
             }
         }
     }
     $this->view->form = $form;
     $this->view->headTitle('yadda. - Contact us', 'SET');
     $this->view->canonical = 'http://' . $this->view->config->domain->www . '/contact';
 }