public function getFilterInput($value) { if (is_int($value)) { $value = $this->getCity($value); } return parent::getFilterInput($value); }
public function getFilterInput($value) { if ($this->getOption('filter_range')) { $from = !empty($value['from']) ? date(cmsConfig::get('date_format'), strtotime($value['from'])) : false; $to = !empty($value['to']) ? date(cmsConfig::get('date_format'), strtotime($value['to'])) : false; $this->title = false; return cmsTemplate::getInstance()->renderFormField($this->class . "_range", array('field' => $this, 'from' => $from, 'to' => $to)); } else { return parent::getFilterInput($value); } }
public function getFilterInput($value) { $units = $this->getProperty('units'); if (!$units) { $units = $this->getOption('units'); } if (!$units) { $units = ''; } if ($this->getOption('filter_range')) { $from = !empty($value['from']) ? intval($value['from']) : false; $to = !empty($value['to']) ? intval($value['to']) : false; return LANG_FROM . ' ' . html_input('text', $this->element_name . '[from]', $from, array('class' => 'input-small')) . ' ' . LANG_TO . ' ' . html_input('text', $this->element_name . '[to]', $to, array('class' => 'input-small')) . ($units ? ' ' . $units : ''); } else { return parent::getFilterInput($value); } }