aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/input/checkbox.php9
-rw-r--r--views/default/input/form.php7
-rw-r--r--views/default/input/password.php3
-rw-r--r--views/default/input/pulldown.php1
4 files changed, 7 insertions, 13 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\"/>";
diff --git a/views/default/input/form.php b/views/default/input/form.php
index 50c51be73..5006dc5c8 100644
--- a/views/default/input/form.php
+++ b/views/default/input/form.php
@@ -18,12 +18,7 @@ $defaults = array(
$vars = array_merge($defaults, $vars);
-$body = $vars['body'];
-unset($vars['body']);
-
$vars['action'] = elgg_normalize_url($vars['action']);
-
-// @todo why?
$vars['method'] = strtolower($vars['method']);
// Generate a security header
@@ -32,6 +27,8 @@ if (!$vars['disable_security']) {
}
unset($vars['disable_security']);
+$body = $vars['body'];
+unset($vars['body']);
$attributes = elgg_format_attributes($vars);
diff --git a/views/default/input/password.php b/views/default/input/password.php
index 1bd70a419..335325c21 100644
--- a/views/default/input/password.php
+++ b/views/default/input/password.php
@@ -15,8 +15,7 @@
$defaults = array(
'class' => 'elgg-input-password',
'disabled' => FALSE,
-
-)
+);
$attrs = array_merge($defaults, $vars);
?>
diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php
index 994de5297..705329691 100644
--- a/views/default/input/pulldown.php
+++ b/views/default/input/pulldown.php
@@ -5,4 +5,5 @@
* @deprecated 1.8
*/
+elgg_deprecated_notice("input/pulldown was deprecated by input/dropdown", 1.8);
echo elgg_view('input/dropdown', $vars);