mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
lost string support for form options fix
This commit is contained in:
@@ -107,12 +107,14 @@ class e_form
|
|||||||
// For Comma separated keyword tags.
|
// For Comma separated keyword tags.
|
||||||
function tags($name, $value, $maxlength = 200, $options = array())
|
function tags($name, $value, $maxlength = 200, $options = array())
|
||||||
{
|
{
|
||||||
|
if(is_string($options)) parse_str($options, $options);
|
||||||
$options['class'] = 'tbox input-text e-tags';
|
$options['class'] = 'tbox input-text e-tags';
|
||||||
return $this->text($name, $value, $maxlength, $options);
|
return $this->text($name, $value, $maxlength, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function text($name, $value, $maxlength = 200, $options = array())
|
function text($name, $value, $maxlength = 200, $options = array())
|
||||||
{
|
{
|
||||||
|
if(is_string($options)) parse_str($options, $options);
|
||||||
if(!vartrue($options['class']) && $maxlength > 99) $options['class'] = 'tbox span5';
|
if(!vartrue($options['class']) && $maxlength > 99) $options['class'] = 'tbox span5';
|
||||||
$options = $this->format_options('text', $name, $options);
|
$options = $this->format_options('text', $name, $options);
|
||||||
//never allow id in format name-value for text fields
|
//never allow id in format name-value for text fields
|
||||||
@@ -121,6 +123,7 @@ class e_form
|
|||||||
|
|
||||||
function number($name, $value, $maxlength = 200, $options = array())
|
function number($name, $value, $maxlength = 200, $options = array())
|
||||||
{
|
{
|
||||||
|
if(is_string($options)) parse_str($options, $options);
|
||||||
$maxlength = vartrue($parms['maxlength'], 255);
|
$maxlength = vartrue($parms['maxlength'], 255);
|
||||||
unset($parms['maxlength']);
|
unset($parms['maxlength']);
|
||||||
if(!vartrue($parms['size'])) $parms['size'] = 15;
|
if(!vartrue($parms['size'])) $parms['size'] = 15;
|
||||||
|
Reference in New Issue
Block a user