public function processStatus()
 {
     parent::processStatus();
     if (Validate::isLoadedObject($object = $this->loadObject()) && $object->active == 1) {
         return Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
     }
     return false;
 }
Ejemplo n.º 2
0
 public function processStatus()
 {
     $object = $this->loadObject();
     if ($this->checkDisableStatus($object)) {
         $this->checkEmployeeIdLang($object->id);
         return parent::processStatus();
     }
     return false;
 }
Ejemplo n.º 3
0
 public function processStatus()
 {
     $this->loadObject(true);
     if (!Validate::isLoadedObject($this->object)) {
         return false;
     }
     if (($error = $this->object->validateFields(false, true)) !== true) {
         $this->errors[] = $error;
     }
     if (($error = $this->object->validateFieldsLang(false, true)) !== true) {
         $this->errors[] = $error;
     }
     if (count($this->errors)) {
         return false;
     }
     $res = parent::processStatus();
     return $res;
 }
Ejemplo n.º 4
0
 public function processStatus()
 {
     if (!$this->canModifyEmployee()) {
         return false;
     }
     parent::processStatus();
 }
 public function processStatus()
 {
     if (Validate::isLoadedObject($object = $this->loadObject())) {
         Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
     }
     parent::processStatus();
 }
Ejemplo n.º 6
0
 public function processStatus()
 {
     $this->loadObject(true);
     if (!Validate::isLoadedObject($this->object)) {
         return false;
     }
     if (($error = $this->object->validateFields(false, true)) !== true) {
         $this->errors[] = $error;
     }
     if (($error = $this->object->validateFieldsLang(false, true)) !== true) {
         $this->errors[] = $error;
     }
     if (count($this->errors)) {
         return false;
     }
     $res = parent::processStatus();
     $query = trim(Tools::getValue('bo_query'));
     $searchType = (int) Tools::getValue('bo_search_type');
     if ($query) {
         $this->redirect_after = preg_replace('/[\\?|&](bo_query|bo_search_type)=([^&]*)/i', '', $this->redirect_after);
         $this->redirect_after .= '&bo_query=' . $query . '&bo_search_type=' . $searchType;
     }
     return $res;
 }
Ejemplo n.º 7
0
 /**
  * @see AdminController::processStatus()
  */
 public function processStatus()
 {
     $object = $this->loadObject();
     if (!$this->checkDisableStatus($object)) {
         return false;
     }
     return parent::processStatus();
 }