Add pip form fields before form is built
authorMatthias Schmidt <gravatronics@live.com>
Sat, 9 Jun 2018 11:20:34 +0000 (13:20 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 9 Jun 2018 12:48:23 +0000 (14:48 +0200)
See #2545

wcfsetup/install/files/lib/acp/form/DevtoolsProjectPipEntryAddForm.class.php

index e3e994be90c87a78ee6c37c26fb66b2d7373c1c9..23aa2f291b9082a089272b7702984839d9fe60fe 100644 (file)
@@ -95,12 +95,10 @@ class DevtoolsProjectPipEntryAddForm extends AbstractFormBuilderForm {
        /**
         * @inheritDoc
         */
-       public function readData() {
-               // we have to do it here so that the pip object is available to
-               // add the pip-specific form fields
-               $this->addPipFormFields();
+       public function createForm() {
+               parent::createForm();
                
-               parent::readData();
+               $this->addPipFormFields();
        }
        
        /**
@@ -130,7 +128,6 @@ class DevtoolsProjectPipEntryAddForm extends AbstractFormBuilderForm {
                // re-build form after having created a new object
                if ($this->formAction === 'create') {
                        $this->buildForm();
-                       $this->addPipFormFields();
                }
                
                WCF::getTPL()->assign('success', true);