upgrade
This commit is contained in:
28
main/inc/lib/formvalidator/Element/Number.php
Normal file
28
main/inc/lib/formvalidator/Element/Number.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
/**
|
||||
* Number element.
|
||||
*
|
||||
* Class Number
|
||||
*/
|
||||
class Number extends HTML_QuickForm_text
|
||||
{
|
||||
/**
|
||||
* @param string $elementName
|
||||
* @param string $elementLabel
|
||||
* @param array $attributes
|
||||
*/
|
||||
public function __construct($elementName = null, $elementLabel = null, $attributes = null)
|
||||
{
|
||||
if (!isset($attributes['id'])) {
|
||||
$attributes['id'] = $elementName;
|
||||
}
|
||||
|
||||
$attributes['type'] = 'number';
|
||||
|
||||
parent::__construct($elementName, $elementLabel, $attributes);
|
||||
$this->_appendName = true;
|
||||
$this->setType('number');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user