| | |
| | | } |
| | | |
| | | // 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(); |
| | | } |
| | |
| | | } |
| | | |
| | | // take value attribute as content |
| | | if ($value == '') { |
| | | if (empty($value) && !empty($this->attrib['value'])) { |
| | | $value = $this->attrib['value']; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (!empty($value) && !isset($this->attrib['mce_editable'])) { |
| | | $value = Q($value, 'strict', FALSE); |
| | | $value = Q($value, 'strict', false); |
| | | } |
| | | return self::tag($this->tagname, $this->attrib, Q($value), array_merge(self::$common_attrib, $this->allowed_attrib)); |
| | | return self::tag($this->tagname, $this->attrib, $value, array_merge(self::$common_attrib, $this->allowed_attrib)); |
| | | } |
| | | } |
| | | |
| | |
| | | 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'])); |
| | | } |