From 358bf0eefac394cc599f9f6c1dbd1d1a05e0b874 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sat, 2 Feb 2013 16:18:48 -0500 Subject: [PATCH] Fixed an issue with input types --- classes/HTML.php | 4 +++- jar.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/HTML.php b/classes/HTML.php index 6d36120..a7c1ad3 100644 --- a/classes/HTML.php +++ b/classes/HTML.php @@ -41,7 +41,7 @@ class HTML extends Object } // ->inputType('name', $attributes); - if (preg_match('/^input/', $method)) + if (preg_match('/^input/', $method) && !isset($attributes['label'])) { $type = strtolower(str_replace('input', '', $method)); @@ -51,6 +51,8 @@ class HTML extends Object case '': $type = 'text'; break; } + $method = 'input'; + if (is_array($attributes)) { $attributes['type'] = $type; diff --git a/jar.php b/jar.php index d20a906..169d4ff 100755 --- a/jar.php +++ b/jar.php @@ -4200,7 +4200,7 @@ class HTML extends Object } // ->inputType('name', $attributes); - if (preg_match('/^input/', $method)) + if (preg_match('/^input/', $method) && !isset($attributes['label'])) { $type = strtolower(str_replace('input', '', $method)); @@ -4210,6 +4210,8 @@ class HTML extends Object case '': $type = 'text'; break; } + $method = 'input'; + if (is_array($attributes)) { $attributes['type'] = $type;