From fd73d8e61466939b90f1c3f0d95a803143e3c77c Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 6 Oct 2020 11:27:56 -0400 Subject: [PATCH] - Set formSent() public on FormHandler class - Fixed class attributes on form which was overwritting it instead of adding to base class --- src/Form/UiForm.php | 6 ++++++ src/Method/FormHandler.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Form/UiForm.php b/src/Form/UiForm.php index 1a0450f..5d5b5e2 100644 --- a/src/Form/UiForm.php +++ b/src/Form/UiForm.php @@ -57,6 +57,12 @@ class UiForm extends UiElement implements Extension { $this->option('tag-type', 'single'); + + if ($attributes['class'] ?? false) { + $attributes['class'] .= " {$this->attributes['class']}"; + unset($this->attributes['class']); + } + $this->attributes([ 'method' => $method, 'action' => $action ] + $attributes); if ( $method !== "get" ) { diff --git a/src/Method/FormHandler.php b/src/Method/FormHandler.php index 4b7cd1c..223bb44 100644 --- a/src/Method/FormHandler.php +++ b/src/Method/FormHandler.php @@ -34,7 +34,7 @@ class FormHandler { $this->initialize(); } - protected function formSent() : void + public function formSent() : void { if ( false !== $this->context->formSent = $this->sent ) { if ( $this->context->formName ?? false ) {