Version 0.9.5 beta - added form attribute disabled to the textfield

This commit is contained in:
Stephan Kasdorf
2020-09-29 20:43:08 +02:00
parent b297a2e40a
commit 419e047bc3
3 changed files with 5 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ class FormAttributes
$this->_element = str_replace(' onsubmit="ONSUBMIT"', '', $this->_element);
$this->_element = str_replace(' onclick="ONCLICK"', '', $this->_element);
$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(' tabindex="TABINDEX"', '', $this->_element);
$this->_element = str_replace(' SPEECH', '', $this->_element);

View File

@@ -20,7 +20,8 @@ class TypeText extends FormAttributes implements IForm
self::FORM_ATTRIBUTE_PLACEHOLDER => '',
self::FORM_ATTRIBUTE_REQUIRED => '',
self::FORM_ATTRIBUTE_MAXLENGTH => '',
self::FORM_ATTRIBUTE_TABINDEX => ''
self::FORM_ATTRIBUTE_TABINDEX => '',
self::FORM_ATTRIBUTE_DISABLED => ''
);
public function loadElement( $attributes )
@@ -36,7 +37,7 @@ class TypeText extends FormAttributes implements IForm
*/
private function _setElement( )
{
$this->_element = '<input type="text" name="NAME" value="VALUE" placeholder="PLACEHOLDER" maxlength="MAXLENGTH" tabindex="TABINDEX" required="REQUIRED" SPEECH ID CLASS>' . "\n";
$this->_element = '<input type="text" name="NAME" value="VALUE" placeholder="PLACEHOLDER" maxlength="MAXLENGTH" tabindex="TABINDEX" required="REQUIRED" disabled="DISABLED" SPEECH ID CLASS>' . "\n";
}

View File

@@ -42,6 +42,7 @@ interface IForm
const FORM_ATTRIBUTE_CHECKED = 'checked';
const FORM_ATTRIBUTE_MAXLENGTH = 'maxlength';
const FORM_ATTRIBUTE_TABINDEX = 'tabindex';
const FORM_ATTRIBUTE_DISABLED = 'disabled';
/**
* @desc loads the current Form element to the form