diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
commit | dccc333c765bb28da55b4a55d9c916acdb88413a (patch) | |
tree | bdd26a0b4cd85241a19b7fcb2c0770f0ac3eb9f0 /views/default/input/checkbox.php | |
parent | ec7b94a64aef23b85866ecdac8e8acc712d29bb6 (diff) | |
parent | 003cb81c7888f4d2fd763e5814027c6f8d71186f (diff) | |
download | elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.gz elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.bz2 |
Merge branch 'master' of github.com:brettp/Elgg
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); ?> /> |