| @@ 228-248 (lines=21) @@ | ||
| 225 | <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'], '>'; |
|
| 226 | ||
| 227 | // Always fun - select boxes! |
|
| 228 | elseif ($field['type'] == 'select') |
|
| 229 | { |
|
| 230 | echo ' |
|
| 231 | <select name="', $key, '" id="', $key, '" tabindex="', $context['tabindex']++, '">'; |
|
| 232 | ||
| 233 | if (isset($field['options'])) |
|
| 234 | { |
|
| 235 | // Is this some code to generate the options? |
|
| 236 | if (!is_array($field['options'])) |
|
| 237 | $field['options'] = eval($field['options']); |
|
| 238 | ||
| 239 | // Assuming we now have some! |
|
| 240 | if (is_array($field['options'])) |
|
| 241 | foreach ($field['options'] as $value => $name) |
|
| 242 | echo ' |
|
| 243 | <option', is_numeric($value) ? ' value="" disabled' : ' value="' . $value . '"', $value === $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
|
| 244 | } |
|
| 245 | ||
| 246 | echo ' |
|
| 247 | </select>'; |
|
| 248 | } |
|
| 249 | ||
| 250 | // Something to end with? |
|
| 251 | if (!empty($field['postinput'])) |
|
| @@ 1548-1568 (lines=21) @@ | ||
| 1545 | <input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" ', $field['input_attr'], '>'; |
|
| 1546 | ||
| 1547 | // Always fun - select boxes! |
|
| 1548 | elseif ($field['type'] == 'select') |
|
| 1549 | { |
|
| 1550 | echo ' |
|
| 1551 | <select name="', $key, '" id="', $key, '">'; |
|
| 1552 | ||
| 1553 | if (isset($field['options'])) |
|
| 1554 | { |
|
| 1555 | // Is this some code to generate the options? |
|
| 1556 | if (!is_array($field['options'])) |
|
| 1557 | $field['options'] = $field['options'](); |
|
| 1558 | ||
| 1559 | // Assuming we now have some! |
|
| 1560 | if (is_array($field['options'])) |
|
| 1561 | foreach ($field['options'] as $value => $name) |
|
| 1562 | echo ' |
|
| 1563 | <option', is_numeric($value) ? ' value="" disabled' : ' value="' . $value . '"', $value === $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
|
| 1564 | } |
|
| 1565 | ||
| 1566 | echo ' |
|
| 1567 | </select>'; |
|
| 1568 | } |
|
| 1569 | ||
| 1570 | // Something to end with? |
|
| 1571 | if (!empty($field['postinput'])) |
|