aboutsummaryrefslogtreecommitdiff
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
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
-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);