mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
Fix variable name changing within number() method - needs check to ensure intent of function is now achieved
This commit is contained in:
@@ -210,17 +210,21 @@ class e_form
|
|||||||
//never allow id in format name-value for text fields
|
//never allow id in format name-value for text fields
|
||||||
return "<input type='text' name='{$name}' value='{$value}' maxlength='{$maxlength}'".$this->get_attributes($options, $name)." />";
|
return "<input type='text' name='{$name}' value='{$value}' maxlength='{$maxlength}'".$this->get_attributes($options, $name)." />";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function number($name, $value, $maxlength = 200, $options = array())
|
function number($name, $value, $maxlength = 200, $options = array())
|
||||||
{
|
{
|
||||||
if(is_string($options)) parse_str($options, $options);
|
if(is_string($options)) parse_str($options, $options);
|
||||||
$maxlength = vartrue($parms['maxlength'], 255);
|
if (vartrue($options['maxlength'])) $maxlength = $options['maxlength'];
|
||||||
unset($parms['maxlength']);
|
unset($options['maxlength']);
|
||||||
if(!vartrue($parms['size'])) $parms['size'] = 15;
|
if(!vartrue($options['size'])) $options['size'] = 15;
|
||||||
if(!vartrue($parms['class'])) $parms['class'] = 'tbox number e-spinner input-small';
|
if(!vartrue($options['class'])) $options['class'] = 'tbox number e-spinner input-small';
|
||||||
if(!$value) $value = '0';
|
if(!$value) $value = '0';
|
||||||
return $this->text($name, $value, $maxlength, $parms);
|
return $this->text($name, $value, $maxlength, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function email($name, $value, $maxlength = 200, $options = array())
|
function email($name, $value, $maxlength = 200, $options = array())
|
||||||
{
|
{
|
||||||
@@ -230,6 +234,8 @@ class e_form
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function iconpreview($id, $default, $width='', $height='') // FIXME
|
function iconpreview($id, $default, $width='', $height='') // FIXME
|
||||||
{
|
{
|
||||||
// XXX - $name ?!
|
// XXX - $name ?!
|
||||||
|
Reference in New Issue
Block a user