File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
src/Tempest/View/src/Components Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,11 @@ public static function getName(): string
1515 return 'x-form ' ;
1616 }
1717
18- public function isMultipart (GenericElement $ element ): bool
19- {
20- return $ element ->hasAttribute ('enctype ' );
21- }
22-
2318 public function render (GenericElement $ element , ViewRenderer $ renderer ): string
2419 {
2520 $ action = $ element ->getAttribute ('action ' );
2621 $ method = $ element ->getAttribute ('method ' ) ?? 'post ' ;
27- $ enctype = $ this ->isMultipart ($ element )
28- ? "enctype= \"{$ element ->getAttribute ('enctype ' )}\""
29- : '' ;
22+ $ enctype = $ element ->hasAttribute ('enctype ' ) ? sprintf ('enctype="%s" ' , $ element ->getAttribute ('enctype ' )) : '' ;
3023
3124 return <<<HTML
3225<form action=" {$ action }" method=" {$ method }" {$ enctype }>
You can’t perform that action at this time.
0 commit comments