| @@ 152-161 (lines=10) @@ | ||
| 149 | public function parse($arrAttributes=null) |
|
| 150 | { |
|
| 151 | $strClass = 'select'; |
|
| 152 | if ($this->multiple) |
|
| 153 | { |
|
| 154 | $this->strName .= '[]'; |
|
| 155 | $strClass = 'multiselect'; |
|
| 156 | } |
|
| 157 | // Make sure there are no multiple options in single mode |
|
| 158 | elseif (is_array($this->varValue)) |
|
| 159 | { |
|
| 160 | $this->varValue = $this->varValue[0]; |
|
| 161 | } |
|
| 162 | // Chosen |
|
| 163 | if ($this->chosen) |
|
| 164 | { |
|
| @@ 216-224 (lines=9) @@ | ||
| 213 | { |
|
| 214 | $strOptions = ''; |
|
| 215 | ||
| 216 | if ($this->multiple) |
|
| 217 | { |
|
| 218 | $this->strName .= '[]'; |
|
| 219 | } |
|
| 220 | // Make sure there are no multiple options in single mode |
|
| 221 | elseif (is_array($this->varValue)) |
|
| 222 | { |
|
| 223 | $this->varValue = $this->varValue[0]; |
|
| 224 | } |
|
| 225 | // Add empty option if there are none |
|
| 226 | if (empty($this->arrOptions) || !is_array($this->arrOptions)) |
|
| 227 | { |
|