mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 20:51:53 +02:00
Fix: allow null as default value on $frm->number();
This commit is contained in:
parent
ab6484be34
commit
d79d1c41aa
@ -304,14 +304,14 @@ class e_form
|
||||
|
||||
|
||||
|
||||
function number($name, $value, $maxlength = 200, $options = array())
|
||||
function number($name, $value=0, $maxlength = 200, $options = array())
|
||||
{
|
||||
if(is_string($options)) parse_str($options, $options);
|
||||
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 form-control';
|
||||
if(!$value) $value = '0';
|
||||
|
||||
|
||||
$options['type'] ='number';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user