From 02a7ddc5095282d3258d6686ab5a3b88dc1a4968 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Mon, 28 Jan 2019 16:34:46 +0100 Subject: [PATCH] Cleanup form in the `saved` method See #2509 --- .../files/lib/form/AbstractFormBuilderForm.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php index 60f64e9b41..f0f0cd7533 100644 --- a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php +++ b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php @@ -154,14 +154,21 @@ abstract class AbstractFormBuilderForm extends AbstractForm { $this->saved(); + WCF::getTPL()->assign('success', true); + } + + /** + * @inheritDoc + */ + public function saved() { + parent::saved(); + // re-build form after having created a new object if ($this->formAction === 'create') { $this->form->cleanup(); $this->buildForm(); } - - WCF::getTPL()->assign('success', true); } /** -- 2.20.1