aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/checkbox.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-07-02 09:21:30 -0400
committerCash Costello <cash.costello@gmail.com>2011-07-02 09:21:30 -0400
commitf5f3f205e97c2a3219897dd14de7d57659ce1181 (patch)
treee89da8c8aa003826b1815cabaf01d1fbcfbb351f /views/default/input/checkbox.php
parent9e9b28479b6ecfd8685b2bba7f9ae5856ece9b2e (diff)
downloadelgg-f5f3f205e97c2a3219897dd14de7d57659ce1181.tar.gz
elgg-f5f3f205e97c2a3219897dd14de7d57659ce1181.tar.bz2
Fixes #3624 input views use class extending rather than overriding
Diffstat (limited to 'views/default/input/checkbox.php')
-rw-r--r--views/default/input/checkbox.php16
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); ?> />