[FEATURE] Scheduler: Add delete button to edit view 60/20860/4
authorPhilipp Gampe <philipp.gampe@typo3.org>
Fri, 17 May 2013 04:45:06 +0000 (06:45 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 22 Jun 2013 22:36:18 +0000 (00:36 +0200)
The task edit view misses a delete button similar to the tceforms edit
view.
Add this button for the edit action.

Group the buttons to distinguish close from save and save from delete.

Resolves: #48054
Releases: 6.2
Change-Id: I79997357f1069c53398f813fcd3b66f809fc059e
Reviewed-on: https://review.typo3.org/20860
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/mod1/mod_template.html

index 7b5dbb3..22b492a 100644 (file)
@@ -1405,6 +1405,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                        'close' => '',
                        'save' => '',
                        'saveclose' => '',
+                       'delete' => '',
                        'reload' => '',
                        'shortcut' => $this->getShortcutButton()
                );
@@ -1421,6 +1422,9 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                        $buttons['save'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="save" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:save', TRUE) . '" />' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save') . '</button>';
                        $buttons['saveclose'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="saveclose" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:saveAndClose', TRUE) . '" />' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-close') . '</button>';
                }
+               if ($this->CMD === 'edit') {
+                       $buttons['delete'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="delete" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '" />' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-delete') . '</button>';
+               }
                return $buttons;
        }
 
index 923e13f..33d0548 100644 (file)
@@ -26,7 +26,9 @@
 <!-- ###BUTTON_GROUP_WRAP### -->
 
 <!-- ###BUTTON_GROUPS_LEFT### -->
-<!-- ###BUTTON_GROUP1### -->###ADDTASK######CLOSE######SAVE######SAVECLOSE###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUP1### -->###ADDTASK######CLOSE###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUP2### -->###SAVE######SAVECLOSE###<!-- ###BUTTON_GROUP2### -->
+<!-- ###BUTTON_GROUP3### -->###DELETE###<!-- ###BUTTON_GROUP3### -->
 <!-- ###BUTTON_GROUPS_LEFT### -->
 
 <!-- ###BUTTON_GROUPS_RIGHT### -->