Esempio n. 1
0
 public function companyAction()
 {
     $object = Wpjb_Model_Employer::current();
     if ($this->_request->post("remove_image") == 1) {
         $this->_addInfo(__("Image removed.", WPJB_DOMAIN));
         $object->deleteImage();
         $object->save();
     }
     $form = new Wpjb_Form_Admin_Company($object->getId(), Wpjb_Form_Admin_Company::MODE_SELF);
     if ($this->isPost() && !$this->_request->post("remove_image")) {
         $isValid = $form->isValid($this->_request->getAll());
         if ($isValid) {
             $this->_addInfo(__("Company profile saved.", WPJB_DOMAIN));
             $form->save();
         } else {
             $this->_addError(__("Cannot save profile information. There are errors in your form.", WPJB_DOMAIN));
         }
     }
     $this->view->form = $form;
 }
Esempio n. 2
0
 public function init()
 {
     parent::init();
     $this->removeElement("is_active");
 }