diff --git a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php index 25024277ff6ffcf7fd8d05bc5dae54541f0b4a05..f1b88eb6c4740d19031ab87571a5ce809854c7bf 100644 --- a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php +++ b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php @@ -162,7 +162,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas // Prepare main content $this->content .= '<h1>' . $this->getLanguageService()->getLL('function.' . $this->MOD_SETTINGS['function']) . '</h1>'; $this->content .= $this->getModuleContent(); - $this->content .= '</form>'; + $this->content .= '</form><div id="extraFieldsHidden"></div>'; } else { // If no access, only display the module's title $this->content = '<h1>' . $this->getLanguageService()->getLL('title.') . '</h1>'; @@ -800,6 +800,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas . '</div></div>'; // Display additional fields + $table[] = '<div id="extraFieldsSection">'; foreach ($allAdditionalFields as $class => $fields) { if ($class == $taskInfo['class']) { $additionalFieldsStyle = ''; @@ -820,6 +821,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas } } } + $table[] = '</div>'; $this->view->assign('table', implode(LF, $table)); $this->view->assign('now', $this->getServerTime()); diff --git a/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js b/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js index 92017b522d712b44e30a80404adbb2aab7c5c24e..3e364a02f10282f6527e0be59ef5d7150fdc860d 100644 --- a/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js +++ b/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js @@ -14,7 +14,9 @@ /** * Module: TYPO3/CMS/Scheduler/Scheduler */ -define(['jquery'], function($) { +define(['jquery', + 'TYPO3/CMS/Backend/SplitButtons' + ], function($, SplitButtons) { /** * @@ -168,5 +170,13 @@ define(['jquery'], function($) { $(Scheduler.initializeEvents); $(Scheduler.initializeDefaultStates); + SplitButtons.addPreSubmitCallback(function() { + var taskClass = $('#task_class').val(); + taskClass = taskClass.toLowerCase().replace(/\\/g, '-'); + + $('.extraFields').appendTo($('#extraFieldsHidden')); + $('.extra_fields_' + taskClass).appendTo($('#extraFieldsSection')); + }); + return Scheduler; });