From b1890228d61304bb0c4b6828af457dd9ef96f4f3 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sat, 12 Feb 2011 07:04:24 +0000 Subject: Refs #2143: General cleanup of input views git-svn-id: http://code.elgg.org/elgg/trunk@8148 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/input/checkbox.php | 9 +++------ views/default/input/form.php | 7 ++----- views/default/input/password.php | 3 +-- views/default/input/pulldown.php | 1 + 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 ""; 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); -- cgit v1.2.3