diff options
Diffstat (limited to 'views/default/input/checkbox.php')
-rw-r--r-- | views/default/input/checkbox.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php index 898fe8458..3dc75c6c3 100644 --- a/views/default/input/checkbox.php +++ b/views/default/input/checkbox.php @@ -10,13 +10,20 @@ * Pass input tag attributes as key value pairs. For a list of allowable * attributes, see http://www.w3schools.com/tags/tag_input.asp * - * @uses mixed $vars['default'] The default value to submit if not checked. - * Optional, defaults to 0. Set to false for no default. + * @uses $vars['default'] The default value to submit if not checked. + * Optional, defaults to 0. Set to false for no default. + * @uses $vars['class'] Additional CSS class */ +if (isset($vars['class'])) { + $vars['class'] = "elgg-input-checkbox {$vars['class']}"; +} else { + $vars['class'] = "elgg-input-checkbox"; +} + $defaults = array( - 'class' => 'elgg-input-checkbox', 'default' => 0, + 'disabled' => false, ); $vars = array_merge($defaults, $vars); @@ -29,5 +36,4 @@ if (isset($vars['name']) && $default !== false) { } ?> - -<input type="checkbox" <?php echo elgg_format_attributes($vars); ?> />
\ No newline at end of file +<input type="checkbox" <?php echo elgg_format_attributes($vars); ?> /> |