mirror of
https://github.com/e107inc/e107.git
synced 2025-01-18 05:09:05 +01:00
Fix variable name changing within number() method - needs check to ensure intent of function is now achieved
This commit is contained in:
parent
f268a6245a
commit
dda91e9a1e
@ -210,17 +210,21 @@ class e_form
|
||||
//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)." />";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function number($name, $value, $maxlength = 200, $options = array())
|
||||
{
|
||||
if(is_string($options)) parse_str($options, $options);
|
||||
$maxlength = vartrue($parms['maxlength'], 255);
|
||||
unset($parms['maxlength']);
|
||||
if(!vartrue($parms['size'])) $parms['size'] = 15;
|
||||
if(!vartrue($parms['class'])) $parms['class'] = 'tbox number e-spinner input-small';
|
||||
if (vartrue($options['maxlength'])) $maxlength = $options['maxlength'];
|
||||
unset($options['maxlength']);
|
||||
if(!vartrue($options['size'])) $options['size'] = 15;
|
||||
if(!vartrue($options['class'])) $options['class'] = 'tbox number e-spinner input-small';
|
||||
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())
|
||||
{
|
||||
@ -230,6 +234,8 @@ class e_form
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function iconpreview($id, $default, $width='', $height='') // FIXME
|
||||
{
|
||||
// XXX - $name ?!
|
||||
|
Loading…
x
Reference in New Issue
Block a user