diff --git a/typo3/sysext/form/Classes/Controller/WizardController.php b/typo3/sysext/form/Classes/Controller/WizardController.php index 14df9b34fcf2f658e0371ad6f985132264014463..e7185dc80f9a0a8d9c23c029bc01e5e18510aea1 100644 --- a/typo3/sysext/form/Classes/Controller/WizardController.php +++ b/typo3/sysext/form/Classes/Controller/WizardController.php @@ -70,32 +70,6 @@ class WizardController ->withHeader('Pragma', 'no-cache'); } - /** - * The load action called via AJAX - * - * The action which should be taken when the form in the wizard is loaded - * - * @param ServerRequestInterface $request - * @param ResponseInterface $response the response object - * @return ResponseInterface returns a 500 error or a valid JSON response - */ - public function loadAction(ServerRequestInterface $request, ResponseInterface $response) - { - $result = $this->getRepository()->getRecordAsJson(); - if (!$result) { - $response = $response->withStatus(500); - $result = ['message' => $this->getLanguageService()->getLL('action_load_message_failed', false)]; - } else { - $result = ['configuration' => $result]; - } - $response->getBody()->write(json_encode($result)); - return $response - ->withHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT') - ->withHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT') - ->withHeader('Cache-Control', 'no-cache, must-revalidate') - ->withHeader('Pragma', 'no-cache'); - } - /** * Gets the repository object. * diff --git a/typo3/sysext/form/Configuration/Backend/AjaxRoutes.php b/typo3/sysext/form/Configuration/Backend/AjaxRoutes.php index 6942f36f7c9cc4650be21b36b0d0bdd39ad8b4c5..660792b6c3ab6a92bc9eb146fde6d2eba38c9209 100644 --- a/typo3/sysext/form/Configuration/Backend/AjaxRoutes.php +++ b/typo3/sysext/form/Configuration/Backend/AjaxRoutes.php @@ -5,12 +5,6 @@ use TYPO3\CMS\Form\Controller\WizardController; * Definitions for AJAX routes provided by EXT:form */ return [ - // Loads the current form wizard data - 'formwizard_load' => [ - 'path' => '/wizard/form/load', - 'target' => WizardController::class . '::loadAction' - ], - // Save the current form wizard 'formwizard_save' => [ 'path' => '/wizard/form/save', diff --git a/typo3/sysext/form/Resources/Private/Language/locallang_wizard.xlf b/typo3/sysext/form/Resources/Private/Language/locallang_wizard.xlf index 2066e59ba8aa889ec9077d851d1574ac8a4078fa..488988b1e490b9398a02e5201c03badababdeb2d 100644 --- a/typo3/sysext/form/Resources/Private/Language/locallang_wizard.xlf +++ b/typo3/sysext/form/Resources/Private/Language/locallang_wizard.xlf @@ -45,9 +45,6 @@ <trans-unit id="action_save_message_saved"> <source>Changes saved successfully</source> </trans-unit> - <trans-unit id="action_load_message_failed"> - <source>Failed to save the form</source> - </trans-unit> <trans-unit id="button_remove"> <source>Remove</source> </trans-unit> diff --git a/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Initialize.js b/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Initialize.js deleted file mode 100644 index 593fddc1f9db8973bb3007397249c79965ba7624..0000000000000000000000000000000000000000 --- a/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Initialize.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Initialize - * - * Adds a listener to be notified when the document is ready - * (before onload and before images are loaded). - * Shorthand of Ext.EventManager.onDocumentReady. - * - * @param {Function} fn The method the event invokes. - * @param {Object} scope (optional) The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {Boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}. It is recommended that the options - * {single: true} be used so that the handler is removed on first invocation. - * - * @return void - */ -Ext.onReady(function() { - // Instantiate new viewport - TYPO3.Form.Wizard.Settings.ajaxUrl = document.location.href; - var viewport = new TYPO3.Form.Wizard.Viewport({}); - // When the window is resized, the viewport has to be resized as well - Ext.EventManager.onWindowResize(viewport.doLayout, viewport); -}); diff --git a/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Viewport/Right.js b/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Viewport/Right.js index c19d844ef640f1e632e03c3ecb1afd3e111da919..994fee3aec4c36f0905f7ad6f87a45b45bc5ef2d 100644 --- a/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Viewport/Right.js +++ b/typo3/sysext/form/Resources/Public/JavaScript/Wizard/Viewport/Right.js @@ -76,30 +76,13 @@ TYPO3.Form.Wizard.Viewport.Right = Ext.extend(Ext.Container, { }, /** - * Load the form with an AJAX call + * Load the form from config * * Loads the configuration and initializes the history */ loadForm: function() { - var wizardUrl = TYPO3.Form.Wizard.Settings.ajaxUrl; - var url = wizardUrl.substring(wizardUrl.indexOf('&P')); - url = TYPO3.settings.ajaxUrls['formwizard_load'] + url; - Ext.Ajax.request({ - url: url, - method: 'POST', - success: function(response, opts) { - var responseObject = Ext.decode(response.responseText); - this.loadConfiguration(responseObject.configuration); - this.initializeHistory(); - }, - failure: function(response, opts) { - Ext.MessageBox.alert( - 'Loading form', - 'Server-side failure with status code ' + response.status - ); - }, - scope: this - }); + this.loadConfiguration(TYPO3.Form.Wizard.Settings.Configuration); + this.initializeHistory(); }, /**