Fixed an issue with input types
This commit is contained in:
parent
9c73061a0a
commit
358bf0eefa
2 changed files with 6 additions and 2 deletions
|
@ -41,7 +41,7 @@ class HTML extends Object
|
||||||
}
|
}
|
||||||
|
|
||||||
// ->inputType('name', $attributes);
|
// ->inputType('name', $attributes);
|
||||||
if (preg_match('/^input/', $method))
|
if (preg_match('/^input/', $method) && !isset($attributes['label']))
|
||||||
{
|
{
|
||||||
$type = strtolower(str_replace('input', '', $method));
|
$type = strtolower(str_replace('input', '', $method));
|
||||||
|
|
||||||
|
@ -51,6 +51,8 @@ class HTML extends Object
|
||||||
case '': $type = 'text'; break;
|
case '': $type = 'text'; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$method = 'input';
|
||||||
|
|
||||||
if (is_array($attributes))
|
if (is_array($attributes))
|
||||||
{
|
{
|
||||||
$attributes['type'] = $type;
|
$attributes['type'] = $type;
|
||||||
|
|
4
jar.php
4
jar.php
|
@ -4200,7 +4200,7 @@ class HTML extends Object
|
||||||
}
|
}
|
||||||
|
|
||||||
// ->inputType('name', $attributes);
|
// ->inputType('name', $attributes);
|
||||||
if (preg_match('/^input/', $method))
|
if (preg_match('/^input/', $method) && !isset($attributes['label']))
|
||||||
{
|
{
|
||||||
$type = strtolower(str_replace('input', '', $method));
|
$type = strtolower(str_replace('input', '', $method));
|
||||||
|
|
||||||
|
@ -4210,6 +4210,8 @@ class HTML extends Object
|
||||||
case '': $type = 'text'; break;
|
case '': $type = 'text'; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$method = 'input';
|
||||||
|
|
||||||
if (is_array($attributes))
|
if (is_array($attributes))
|
||||||
{
|
{
|
||||||
$attributes['type'] = $type;
|
$attributes['type'] = $type;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue