From 84def7b2ace3cfaf5684de4dd6ca40023677c31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 22 May 2023 09:53:25 +0200 Subject: [PATCH] improve cs --- src/Form.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Form.php b/src/Form.php index 58528140f4..f7d582f2a2 100644 --- a/src/Form.php +++ b/src/Form.php @@ -529,10 +529,17 @@ public function setFormConfig($config) public function setupAjaxSubmit(): void { - $this->js(true)->form(array_merge(['inline' => true, 'on' => 'blur'], $this->formConfig)); - - $this->js(true, null, $this->formElement) - ->api(array_merge(['on' => 'submit', 'url' => $this->cb->getJsUrl(), 'method' => 'POST', 'serializeForm' => true], $this->apiConfig)); + $this->js(true)->form(array_merge([ + 'on' => 'blur', + 'inline' => true, + ], $this->formConfig)); + + $this->formElement(true)->api(array_merge([ + 'on' => 'submit', + 'url' => $this->cb->getJsUrl(), + 'method' => 'POST', + 'serializeForm' => true, + ], $this->apiConfig)); // [name] in selector is to suppress https://github.com/fomantic/Fomantic-UI/commit/facbca003cf0da465af7d44af41462e736d3eb8b // console errors from Multiline/vue fields