From f5f3f205e97c2a3219897dd14de7d57659ce1181 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 2 Jul 2011 09:21:30 -0400 Subject: Fixes #3624 input views use class extending rather than overriding --- views/default/input/checkbox.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'views/default/input/checkbox.php') 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) { } ?> - - /> \ No newline at end of file + /> -- cgit v1.2.3