| | |
| | | } |
| | | |
| | | // set value attribute |
| | | $this->attrib['checked'] = ($value && (string)$value == (string)$this->attrib['value']); |
| | | $this->attrib['checked'] = ((string)$value == (string)$this->attrib['value']); |
| | | |
| | | return parent::show(); |
| | | } |
| | |
| | | } |
| | | |
| | | // set value attribute |
| | | $this->attrib['checked'] = ($value && (string)$value == (string)$this->attrib['value']); |
| | | $this->attrib['checked'] = ((string)$value == (string)$this->attrib['value']); |
| | | |
| | | return parent::show(); |
| | | } |
| | |
| | | foreach ($this->options as $option) { |
| | | $attr = array( |
| | | 'value' => $option['value'], |
| | | 'selected' => ((!empty($option['value']) && in_array($option['value'], $select, true)) || |
| | | (in_array($option['text'], $select, TRUE))) ? 1 : null); |
| | | 'selected' => (in_array($option['value'], $select, true) || |
| | | in_array($option['text'], $select, true)) ? 1 : null); |
| | | |
| | | $this->content .= self::tag('option', $attr, Q($option['text'])); |
| | | } |