* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class AdminCounty extends AdminTab { public function __construct() { global $cookie; $this->table = 'county'; $this->className = 'County'; $this->edit = true; $this->delete = true; $this->_select = 's.`name` AS state'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`)'; $this->fieldsDisplay = array( 'id_county' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('County'), 'width' => 130, 'filter_key' => 'b!name'), 'state' => array('title' => $this->l('State'), 'width' => 70, 'filter_key' => 's!name'), 'a!active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'a!active')); parent::__construct(); } public function renderJS() { return ''; } public function displayForm($isMainTab = true) { global $currentIndex, $cookie; parent::displayForm(); if (!($obj = $this->loadObject(true))) return; $cur_id_country = 0; $cur_id_state = 0; if (isset($obj->id_state)) { $cur_state = new State($obj->id_state); if (Validate::isLoadedObject($cur_state)) { $cur_id_country = $cur_state->id_country; $cur_id_state = $cur_state->id; } } echo $this->renderJS(). '
'; } protected function _renderZipCodeForm() { return '