3 Commits
3 changed files with 10 additions and 5 deletions

No files matched your search

+1 -1
View File
@@ -99,7 +99,7 @@ class Ui extends UiElement implements Extension {
break;
case in_array('time', $options):
$input = new UiText();
$input = new UiTime();
break;
case in_array('url', $options):
+4 -3
View File
@@ -68,7 +68,8 @@ class UiForm extends UiElement implements Extension {
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');
@@ -77,8 +78,8 @@ class UiForm extends UiElement implements Extension {
unset($this->attributes['class']);
}
$this->attributes([ 'method' => $method, 'action' => $action ] + $attributes);
$this->attributes([ 'action' => $action, 'method' => $method, ] + $attributes);
if ( $method !== "get" ) {
if ($this->csrf) {
+5 -1
View File
@@ -54,7 +54,11 @@ class FormContext implements FormContextInterface
$this->fillValues();
$this->files = $request->getUploadedFiles() ?: [];
$this->initialize();
}
public function initialize() : void {}
public function valid() : bool
{
@@ -69,7 +73,7 @@ class FormContext implements FormContextInterface
public function executed() : bool
{
return $this->formExecuted;
return $this->formExecutionStatus === false ? false : $this->formExecuted;
}
public function formSent() : bool