From c507418db9a35ef11965cb9226e6f23f3b41b195 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 21 Jul 2008 11:58:56 +0000 Subject: Removed added newlines ("\n") from most form and html helper functions. --- system/helpers/form_helper.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'system/helpers/form_helper.php') diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 5b28d3de8..21b7df42f 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -111,6 +111,7 @@ if ( ! function_exists('form_hidden')) } $form = ''; + foreach ($name as $name => $value) { $form .= ''; @@ -137,7 +138,7 @@ if ( ! function_exists('form_input')) { $defaults = array('type' => 'text', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value); - return "\n"; + return ""; } } @@ -222,7 +223,7 @@ if ( ! function_exists('form_textarea')) unset($data['value']); // textareas don't use the value attribute } - return "\n"; + return ""; } } @@ -302,11 +303,15 @@ if ( ! function_exists('form_checkbox')) } if ($checked == TRUE) + { $defaults['checked'] = 'checked'; + } else + { unset($defaults['checked']); + } - return "\n"; + return ""; } } @@ -353,7 +358,7 @@ if ( ! function_exists('form_submit')) { $defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value); - return "\n"; + return ""; } } @@ -374,7 +379,7 @@ if ( ! function_exists('form_reset')) { $defaults = array('type' => 'reset', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value); - return "\n"; + return ""; } } @@ -401,7 +406,7 @@ if ( ! function_exists('form_button')) unset($data['content']); // content is not an attribute } - return "\n"; + return ""; } } @@ -486,7 +491,7 @@ if ( ! function_exists('form_fieldset_close')) { function form_fieldset_close($extra = '') { - return "\n".$extra; + return "".$extra; } } @@ -503,7 +508,7 @@ if ( ! function_exists('form_close')) { function form_close($extra = '') { - return "\n".$extra; + return "".$extra; } } -- cgit v1.2.3-24-g4f1b