Version 0.9.5 beta - added attributes max, min, step, onblur, onfocus to the form.
This commit is contained in:
@@ -65,6 +65,9 @@ class FormAttributes
|
||||
$this->_element = str_replace(' action="ACTION"', '', $this->_element);
|
||||
$this->_element = str_replace(' disabled="DISABLED"', '', $this->_element);
|
||||
$this->_element = str_replace(' maxlength="MAXLENGTH"', '', $this->_element);
|
||||
$this->_element = str_replace(' min="MIN"', '', $this->_element);
|
||||
$this->_element = str_replace(' max="MAX"', '', $this->_element);
|
||||
$this->_element = str_replace(' step="STEP"', '', $this->_element);
|
||||
$this->_element = str_replace(' tabindex="TABINDEX"', '', $this->_element);
|
||||
$this->_element = str_replace(' SPEECH', '', $this->_element);
|
||||
$this->_element = str_replace(' FORM', '', $this->_element);
|
||||
@@ -75,6 +78,8 @@ class FormAttributes
|
||||
$this->_element = str_replace(' ', ' ', $this->_element);
|
||||
$this->_element = str_replace(' type="TYPE"', '', $this->_element);
|
||||
$this->_element = str_replace(' onchange="ONCHANGE"', '', $this->_element);
|
||||
$this->_element = str_replace(' onblur="ONBLUR"', '', $this->_element);
|
||||
$this->_element = str_replace(' onfocus="ONFOCUS"', '', $this->_element);
|
||||
$this->_element = str_replace(' target="TARGET"', '', $this->_element);
|
||||
$this->_element = str_replace(' method="METHOD"', '', $this->_element);
|
||||
$this->_element = str_replace(' data-toggle="DATA-TOGGLE"', '', $this->_element);
|
||||
|
||||
@@ -15,7 +15,10 @@ class TypeNumber extends FormAttributes implements IForm
|
||||
self::FORM_NAME => '',
|
||||
self::FORM_VALUE => '',
|
||||
self::FORM_ATTRIBUTE_ID => '',
|
||||
self::FORM_ATTRIBUTE_CLASS => ''
|
||||
self::FORM_ATTRIBUTE_CLASS => '',
|
||||
self::FORM_ATTRIBUTE_MAX => '',
|
||||
self::FORM_ATTRIBUTE_MIN => '',
|
||||
self::FORM_ATTRIBUTE_STEP => ''
|
||||
);
|
||||
|
||||
public function loadElement( $attributes )
|
||||
@@ -31,7 +34,7 @@ class TypeNumber extends FormAttributes implements IForm
|
||||
*/
|
||||
private function _setElement( )
|
||||
{
|
||||
$this->_element = '<input type="number" name="NAME" value="VALUE" ID CLASS>' . "\n";
|
||||
$this->_element = '<input type="number" name="NAME" value="VALUE" min="MIN" max="MAX" step="STEP" ID CLASS>' . "\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@ class TypeSelect extends FormAttributes implements IForm
|
||||
self::FORM_NAME => '',
|
||||
self::FORM_ATTRIBUTE_CLASS => '',
|
||||
self::FORM_ATTRIBUTE_ID => '',
|
||||
self::FORM_ATTRIBUTE_ONCHANGE => ''
|
||||
self::FORM_ATTRIBUTE_ONCHANGE => '',
|
||||
self::FORM_ATTRIBUTE_ONBLUR => '',
|
||||
self::FORM_ATTRIBUTE_ONFOCUS => ''
|
||||
);
|
||||
|
||||
public function loadElement( $attributes )
|
||||
@@ -31,6 +33,6 @@ class TypeSelect extends FormAttributes implements IForm
|
||||
*/
|
||||
private function _setElement( )
|
||||
{
|
||||
$this->_element = '<select name="NAME" onchange="ONCHANGE" ID CLASS SELECTED>' . "\n" . 'OPTIONS' . "\n" . '</select>' . "\n";
|
||||
$this->_element = '<select name="NAME" onchange="ONCHANGE" onblur="ONBLUR" onfocus="ONFOCUS" ID CLASS SELECTED>' . "\n" . 'OPTIONS' . "\n" . '</select>' . "\n";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user