- Fixed executed() method and added a new method handling in UiForm
This commit is contained in:
parent
388b2a70f8
commit
a34ebaf0df
|
@ -68,7 +68,8 @@ class UiForm extends UiElement implements Extension {
|
||||||
|
|
||||||
public function buildHtml(string $method = "get", string $name = "", string $action = "", array $attributes = []) : string
|
public function buildHtml(string $method = "get", string $name = "", string $action = "", array $attributes = []) : string
|
||||||
{
|
{
|
||||||
$method = strtolower($method);
|
# Method passed in arguments take precedents over options
|
||||||
|
$method = strtolower($attributes['method'] ?? $method);
|
||||||
|
|
||||||
$this->option('tag-type', 'single');
|
$this->option('tag-type', 'single');
|
||||||
|
|
||||||
|
@ -77,7 +78,7 @@ class UiForm extends UiElement implements Extension {
|
||||||
unset($this->attributes['class']);
|
unset($this->attributes['class']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->attributes([ 'method' => $method, 'action' => $action ] + $attributes);
|
$this->attributes([ 'action' => $action, 'method' => $method, ] + $attributes);
|
||||||
|
|
||||||
if ( $method !== "get" ) {
|
if ( $method !== "get" ) {
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ class FormContext implements FormContextInterface
|
||||||
|
|
||||||
public function executed() : bool
|
public function executed() : bool
|
||||||
{
|
{
|
||||||
return $this->formExecuted;
|
return $this->formExecutionStatus === false ? false : $this->formExecuted;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function formSent() : bool
|
public function formSent() : bool
|
||||||
|
|
Loading…
Reference in New Issue