From 419e047bc38096e289e17cacaaa94acffadc6667 Mon Sep 17 00:00:00 2001 From: Stephan Kasdorf Date: Tue, 29 Sep 2020 20:43:08 +0200 Subject: [PATCH] Version 0.9.5 beta - added form attribute disabled to the textfield --- core/c/formattributes.php | 1 + core/c/typetext.php | 5 +++-- core/i/form.php | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/c/formattributes.php b/core/c/formattributes.php index be1b841..1ed2557 100755 --- a/core/c/formattributes.php +++ b/core/c/formattributes.php @@ -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); diff --git a/core/c/typetext.php b/core/c/typetext.php index 9fa0da4..ea6ccc7 100644 --- a/core/c/typetext.php +++ b/core/c/typetext.php @@ -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 = '' . "\n"; + $this->_element = '' . "\n"; } diff --git a/core/i/form.php b/core/i/form.php index 757ab79..8a7620f 100644 --- a/core/i/form.php +++ b/core/i/form.php @@ -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