aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/checkbox.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/checkbox.php')
-rw-r--r--views/default/input/checkbox.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/views/default/input/checkbox.php b/views/default/input/checkbox.php
index 0fea3d3c6..898fe8458 100644
--- a/views/default/input/checkbox.php
+++ b/views/default/input/checkbox.php
@@ -16,16 +16,13 @@
$defaults = array(
'class' => 'elgg-input-checkbox',
+ 'default' => 0,
);
$vars = array_merge($defaults, $vars);
-if (isset($vars['default'])) {
- $default = $vars['default'];
- unset($vars['default']);
-} else {
- $default = 0;
-}
+$default = $vars['default'];
+unset($vars['default']);
if (isset($vars['name']) && $default !== false) {
echo "<input type=\"hidden\" name=\"{$vars['name']}\" value=\"$default\"/>";