Ejemplo n.º 1
0
 protected function processActiveSearch()
 {
     $ObjAdvancedSearchClass = new AdvancedSearchClass(Tools::getValue('id_search'));
     $ObjAdvancedSearchClass->active = $ObjAdvancedSearchClass->active ? 0 : 1;
     if ($ObjAdvancedSearchClass->save()) {
         if ($ObjAdvancedSearchClass->active) {
             $this->_html .= '$jqPm("#searchStatusLabel' . $ObjAdvancedSearchClass->id . '").html("' . $this->l('enabled') . '");$jqPm(".status_search_' . $ObjAdvancedSearchClass->id . ' span").removeClass("ui-icon-circle-close").addClass("ui-icon-circle-check");';
         } else {
             $this->_html .= '$jqPm("#searchStatusLabel' . $ObjAdvancedSearchClass->id . '").html("' . $this->l('disabled') . '");$jqPm(".status_search_' . $ObjAdvancedSearchClass->id . ' span").removeClass("ui-icon-circle-check").addClass("ui-icon-circle-close");';
         }
         $this->_html .= 'show_info("' . $this->l('Saved') . '");';
     } else {
         $this->_html .= 'show_error("' . $this->l('Error while updating search') . '");';
     }
 }