- Added multi-part by default to forms
- Fixed some bug within FormContext and FormHandler.
This commit is contained in:
1 parent
50d95defee
commit
657ceb2863
5 files changed
+8
-11
No files matched your search
+3
-1
@@ -55,11 +55,13 @@ class UiForm extends UiElement implements Extension {
|
||||
$method = strtolower($method);
|
||||
|
||||
$this->option('tag-type', 'single');
|
||||
|
||||
$this->attributes([ 'method' => $method, 'action' => $action ] + $attributes);
|
||||
|
||||
if ( $method !== "get" ) {
|
||||
$this->append( ( new UiHidden() )->attributes([ 'name' =>"picea-csrf-protection", 'value' => "abcdefg" ]) );
|
||||
}
|
||||
$this->attributes([ 'enctype' => "multipart/form-data" ]);
|
||||
}
|
||||
|
||||
return $this->render() . PHP_EOL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user