Version 0.9.5 beta - Form update added onclick to the attributes in the button element.

This commit is contained in:
Stephan Kasdorf
2020-11-05 14:34:10 +01:00
parent 1d6f007fff
commit 2e5220c4fc
2 changed files with 8 additions and 6 deletions

View File

@@ -12,11 +12,12 @@ use Nibiru\Adapter;
class TypeButton extends FormAttributes implements IForm
{
private $_attributes = array(
self::FORM_VALUE => '',
self::FORM_ATTRIBUTE_ID => '',
self::FORM_ATTRIBUTE_CLASS => '',
self::FORM_NAME => '',
self::FORM_ATTRIBUTE_TYPE => ''
self::FORM_VALUE => '',
self::FORM_ATTRIBUTE_ID => '',
self::FORM_ATTRIBUTE_CLASS => '',
self::FORM_NAME => '',
self::FORM_ATTRIBUTE_TYPE => '',
self::FORM_ATTRIBUTE_ONCLICK => ''
);
public function loadElement( $attributes )
@@ -32,7 +33,7 @@ class TypeButton extends FormAttributes implements IForm
*/
private function _setElement( )
{
$this->_element = '<button type="TYPE" name="NAME" ID CLASS>VALUE' . "</button>\n";
$this->_element = '<button type="TYPE" name="NAME" onclick="ONCLICK" ID CLASS>VALUE' . "</button>\n";
}
}

View File

@@ -42,6 +42,7 @@ interface IForm
const FORM_ATTRIBUTE_ONSUBMIT = 'onsubmit';
const FORM_ATTRIBUTE_ONBLUR = 'onblur';
const FORM_ATTRIBUTE_ONFOCUS = 'onfocus';
const FORM_ATTRIBUTE_ONCLICK = 'onclick';
const FORM_ATTRIBUTE_SELECTED = 'selected';
const FORM_ATTRIBUTE_CONTEXT = 'context';
const FORM_ATTRIBUTE_CHECKED = 'checked';