[BUGFIX] TCEForms.Suggest wizard in IRRE records
authorNicole Cordes <n.cordes@biz-design.biz>
Fri, 27 Apr 2012 14:45:24 +0000 (16:45 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Mon, 22 Oct 2012 15:23:09 +0000 (17:23 +0200)
Currently suggest wizards don't work in IRRE records. This is because of
the missing javascript functions. IRRE elements are post loaded and
wirzards are not known on loading the parent form.

Change-Id: Id1c23d7e53c4e8499f13bb1776bf76c960995b04
Fixes: #27020
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/11822
Reviewed-by: Wouter Wolters
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/class.t3lib_tceforms.php

index aae266b..1f7f2d3 100644 (file)
@@ -5566,12 +5566,14 @@ class t3lib_TCEforms {
                                inline.setPrependFormFieldNames("' . $this->inline->prependNaming . '");
                                inline.setNoTitleString("' . addslashes(t3lib_BEfunc::getNoRecordTitle(TRUE)) . '");
                                ';
-                       }
-
-                               // if Suggest fields were processed, add the JS functions
-                       if ($this->suggest->suggestCount > 0) {
-                               $pageRenderer->loadScriptaculous();
+                                       // Always include JS functions for Suggest fields as we don't know what will come
                                $this->loadJavascriptLib('../t3lib/js/jsfunc.tceforms_suggest.js');
+                       } else {
+                                       // if Suggest fields were processed, add the JS functions
+                               if ($this->suggest->suggestCount > 0) {
+                                       $pageRenderer->loadScriptaculous();
+                                       $this->loadJavascriptLib('../t3lib/js/jsfunc.tceforms_suggest.js');
+                               }
                        }
 
                                // Toggle icons: