[BUGFIX] Make additional fields visible again in Scheduler
authorJigal van Hemert <jigal@xs4all.nl>
Sat, 29 Sep 2012 05:10:41 +0000 (07:10 +0200)
committerJigal van Hemert <jigal@xs4all.nl>
Sat, 29 Sep 2012 13:38:00 +0000 (15:38 +0200)
Namespaced class names contain backslashes and are not suitable for
use in HTML attributes. Converting them to lowercase and replacing
the backslashes with dashes makes the additional fields for scheduler
tasks visible again when creating a new task.

Change-Id: I61a8fe9ce2ad798ff0823b9b7686238a29b670f6
Fixes: #41460
Releases: 6.0
Reviewed-on: http://review.typo3.org/15150
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/res/tx_scheduler_be.js

index 5065b56..4da7783 100644 (file)
@@ -775,8 +775,9 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                                        $label = '<label for="' . $fieldID . '">' . $GLOBALS['LANG']->sL($fieldInfo['label']) . '</label>';
                                        $table[$tr][] = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp($fieldInfo['cshKey'], $fieldInfo['cshLabel'], $label);
                                        $table[$tr][] = $fieldInfo['code'];
+                                       $htmlClassName = strtolower(str_replace('\\', '-', $class));
                                        $tableLayout[$tr] = array(
-                                               'tr' => array('<tr id="' . $fieldID . '_row"' . $additionalFieldsStyle . ' class="extraFields extra_fields_' . $class . '">', '</tr>'),
+                                               'tr' => array('<tr id="' . $fieldID . '_row"' . $additionalFieldsStyle . ' class="extraFields extra_fields_' . $htmlClassName . '">', '</tr>'),
                                                'defCol' => $defaultCell,
                                                '0' => array('<td class="td-label">', '</td>')
                                        );
index 546d1da..cdc4eeb 100644 (file)
@@ -43,7 +43,7 @@ var allCheckedStatus = false;
  * @return     void
  */
 function actOnChangedTaskClass(theSelector) {
-       var taskClass = theSelector.options[theSelector.selectedIndex].value;
+       var taskClass = theSelector.options[theSelector.selectedIndex].value.toLowerCase().replace(/\\/g, '-');
                // Hide all extra fields
                // Show only relevant extra fields
        Ext.select('.extraFields').setDisplayed(false);