[BUGFIX] Fix "Create multiple pages" wizard 68/38368/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 31 Mar 2015 09:26:59 +0000 (11:26 +0200)
committerMathias Schreiber <mathias.schreiber@wmdb.de>
Tue, 31 Mar 2015 09:40:19 +0000 (11:40 +0200)
The wizard was depending on ExtJS functionality, which
was removed meanwhile. Port the functionality to plain
JavaScript.

Resolves: #66174
Releases: master
Change-Id: Ia0ea02784b1a88ad3d2d2f79ad9d66f49b988f67
Reviewed-on: http://review.typo3.org/38368
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
typo3/sysext/wizard_crpages/Resources/Public/JavaScript/WizardCreatePages.js

index ca9b639..760d766 100644 (file)
@@ -26,10 +26,13 @@ define('TYPO3/CMS/WizardCrpages/WizardCreatePages', ['jquery'], function($) {
        WizardCreatePages.createNewFormFields = function() {
                for (i = 0; i < 5; i++) {
                        var label = this.lineCounter + i + 1;
-                       var line = String.format(tpl, (this.lineCounter + i), label);
+                       var line = tpl
+                               .replace(/\{0\}/g, (this.lineCounter + i))
+                               .replace(/\{1\}/g, label);
+
                        $(line).appendTo(this.containerSelector);
                }
-               this.lineCounter += 5;
+               WizardCreatePages.lineCounter += 5;
        };
 
        WizardCreatePages.actOnTypeSelectChange = function($selectElement) {