From 2e5220c4fc38160d1d2e364e4585853331b1d079 Mon Sep 17 00:00:00 2001 From: Stephan Kasdorf Date: Thu, 5 Nov 2020 14:34:10 +0100 Subject: [PATCH] Version 0.9.5 beta - Form update added onclick to the attributes in the button element. --- core/c/typebutton.php | 13 +++++++------ core/i/form.php | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/c/typebutton.php b/core/c/typebutton.php index 8338996..6677e00 100755 --- a/core/c/typebutton.php +++ b/core/c/typebutton.php @@ -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 = '\n"; + $this->_element = '\n"; } } \ No newline at end of file diff --git a/core/i/form.php b/core/i/form.php index 96dd3ac..d9cfe5b 100644 --- a/core/i/form.php +++ b/core/i/form.php @@ -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';