[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)
committerXavier Perseguers <xavier@typo3.org>
Tue, 16 Oct 2012 09:45:58 +0000 (11:45 +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/11821
Reviewed-by: Wouter Wolters
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/class.t3lib_tceforms.php

index 619dd71..82b6854 100644 (file)
@@ -5474,12 +5474,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: