| @@ 28-30 (lines=3) @@ | ||
| 25 | public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit) |
|
| 26 | { |
|
| 27 | // hide option when disabled and debug mode is off (so that users are not confused) |
|
| 28 | if (!XenForo_Application::debugMode() && !$preparedOption['option_value']) { |
|
| 29 | return XenForo_ViewAdmin_Helper_Option::renderOptionTemplateInternal('threemagateway_option_list_option_hidden', $view, $fieldPrefix, $preparedOption, $canEdit); |
|
| 30 | } |
|
| 31 | ||
| 32 | // set options |
|
| 33 | $preparedOption['edit_format'] = 'onoff'; |
|
| @@ 35-37 (lines=3) @@ | ||
| 32 | $preparedOption['option_value'] = self::correctOption($preparedOption['option_value']); |
|
| 33 | ||
| 34 | // hide option when disabled and debug mode is off (so that users are not confused) |
|
| 35 | if (!XenForo_Application::debugMode() && !$preparedOption['option_value']['enabled']) { |
|
| 36 | return XenForo_ViewAdmin_Helper_Option::renderOptionTemplateInternal('threemagateway_option_list_option_hidden', $view, $fieldPrefix, $preparedOption, $canEdit); |
|
| 37 | } |
|
| 38 | ||
| 39 | // set options |
|
| 40 | $preparedOption['edit_format'] = 'onofftextbox'; |
|