| @@ 1540-1560 (lines=21) @@ | ||
| 1537 | <input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" ', $field['input_attr'], '>'; |
|
| 1538 | ||
| 1539 | // Always fun - select boxes! |
|
| 1540 | elseif ($field['type'] == 'select') |
|
| 1541 | { |
|
| 1542 | echo ' |
|
| 1543 | <select name="', $key, '" id="', $key, '">'; |
|
| 1544 | ||
| 1545 | if (isset($field['options'])) |
|
| 1546 | { |
|
| 1547 | // Is this some code to generate the options? |
|
| 1548 | if (!is_array($field['options'])) |
|
| 1549 | $field['options'] = $field['options'](); |
|
| 1550 | ||
| 1551 | // Assuming we now have some! |
|
| 1552 | if (is_array($field['options'])) |
|
| 1553 | foreach ($field['options'] as $value => $name) |
|
| 1554 | echo ' |
|
| 1555 | <option', is_numeric($value) ? ' value="" disabled' : ' value="' . $value . '"', $value === $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
|
| 1556 | } |
|
| 1557 | ||
| 1558 | echo ' |
|
| 1559 | </select>'; |
|
| 1560 | } |
|
| 1561 | ||
| 1562 | // Something to end with? |
|
| 1563 | if (!empty($field['postinput'])) |
|
| @@ 258-278 (lines=21) @@ | ||
| 255 | <input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>'; |
|
| 256 | ||
| 257 | // Always fun - select boxes! |
|
| 258 | elseif ($field['type'] == 'select') |
|
| 259 | { |
|
| 260 | echo ' |
|
| 261 | <select name="', $key, '" id="', $key, '" tabindex="', $context['tabindex']++, '">'; |
|
| 262 | ||
| 263 | if (isset($field['options'])) |
|
| 264 | { |
|
| 265 | // Is this some code to generate the options? |
|
| 266 | if (!is_array($field['options'])) |
|
| 267 | $field['options'] = eval($field['options']); |
|
| 268 | ||
| 269 | // Assuming we now have some! |
|
| 270 | if (is_array($field['options'])) |
|
| 271 | foreach ($field['options'] as $value => $name) |
|
| 272 | echo ' |
|
| 273 | <option', is_numeric($value) ? ' value="" disabled' : ' value="' . $value . '"', $value === $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
|
| 274 | } |
|
| 275 | ||
| 276 | echo ' |
|
| 277 | </select>'; |
|
| 278 | } |
|
| 279 | ||
| 280 | // Something to end with? |
|
| 281 | if (!empty($field['postinput'])) |
|