aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/checkbox.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 07:04:24 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 07:04:24 +0000
commitb1890228d61304bb0c4b6828af457dd9ef96f4f3 (patch)
tree80975dc9d46cb096ae94e443bba23aa2f60b929d /views/default/input/checkbox.php
parentd5c85494392d8a12e8331a8a52174e75f85e1efd (diff)
downloadelgg-b1890228d61304bb0c4b6828af457dd9ef96f4f3.tar.gz
elgg-b1890228d61304bb0c4b6828af457dd9ef96f4f3.tar.bz2
Refs #2143: General cleanup of input views
git-svn-id: http://code.elgg.org/elgg/trunk@8148 36083f99-b078-4883-b0ff-0f9b5a30f544
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\"/>";