| @@ 630-643 (lines=14) @@ | ||
| 627 | </dd>'; |
|
| 628 | ||
| 629 | // A list with options? |
|
| 630 | elseif ($setting['type'] == 'list') |
|
| 631 | { |
|
| 632 | echo ' |
|
| 633 | <dd> |
|
| 634 | <select name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="', $setting['id'], '">'; |
|
| 635 | ||
| 636 | foreach ($setting['options'] as $value => $label) |
|
| 637 | echo ' |
|
| 638 | <option value="', $value, '"', $value == $setting['value'] ? ' selected' : '', '>', $label, '</option>'; |
|
| 639 | ||
| 640 | echo ' |
|
| 641 | </select> |
|
| 642 | </dd>'; |
|
| 643 | } |
|
| 644 | // A Textarea? |
|
| 645 | elseif ($setting['type'] == 'textarea') |
|
| 646 | { |
|
| @@ 1791-1804 (lines=14) @@ | ||
| 1788 | <input type="checkbox" name="default_options[', $setting['id'], ']" id="', $setting['id'], '"', !empty($context['member']['options'][$setting['id']]) ? ' checked' : '', ' value="1">'; |
|
| 1789 | ||
| 1790 | // How about selection lists, we all love them |
|
| 1791 | elseif ($setting['type'] == 'list') |
|
| 1792 | { |
|
| 1793 | echo ' |
|
| 1794 | <select name="default_options[', $setting['id'], ']" id="', $setting['id'], '"', '>'; |
|
| 1795 | ||
| 1796 | foreach ($setting['options'] as $value => $label) |
|
| 1797 | echo ' |
|
| 1798 | <option value="', $value, '"', $value == $context['member']['options'][$setting['id']] ? ' selected' : '', '>', $label, '</option>'; |
|
| 1799 | ||
| 1800 | echo ' |
|
| 1801 | </select>'; |
|
| 1802 | } |
|
| 1803 | // A textbox it is then |
|
| 1804 | else |
|
| 1805 | { |
|
| 1806 | if (isset($setting['type']) && $setting['type'] == 'number') |
|
| 1807 | { |
|