[TASK] Scheduler: move 'Save' button to docHeader
authorFelix Kopp <felix-source@phorax.com>
Sun, 1 Apr 2012 20:32:00 +0000 (22:32 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 10 Apr 2012 15:29:24 +0000 (17:29 +0200)
Moves save and cancel button in new/edit to the docHeader.

Change-Id: I5fd6b927e233c0deefe13c0885ad6ebfe946a41c
Fixes: #35104
Releases: 4.7, 6.0
Reviewed-on: http://review.typo3.org/10116
Reviewed-by: Andy Grunwald
Tested-by: Andy Grunwald
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/scheduler/class.tx_scheduler_module.php
typo3/sysext/scheduler/mod1/mod_template.html

index 67c14d1..3346e00 100644 (file)
@@ -894,8 +894,7 @@ class tx_scheduler_Module extends t3lib_SCbase {
                $content .= $this->doc->table($table, $tableLayout);
                $content .= '</div></div>';
 
-               $content .= '<div style="padding-top: 20px; clear: both;"></div><div><input type="submit" name="save" class="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:save', TRUE) . '" /> '
-                       . '<input type="button" name="cancel" class="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:cancel', TRUE) . '" onclick="document.location=\'' . $GLOBALS['MCONF']['_'] . '\'" /></div>';
+               $content .= '<div style="padding-top: 20px; clear: both;"></div>';
 
                        // Display information about server time usage
                $content .= $this->displayServerTime();
@@ -1577,6 +1576,8 @@ class tx_scheduler_Module extends t3lib_SCbase {
        protected function getDocHeaderButtons() {
                $buttons = array(
                        'addtask'  => '',
+                       'close' => '',
+                       'save' => '',
                        'reload'   => '',
                        'shortcut' => $this->getShortcutButton(),
                );
@@ -1594,6 +1595,16 @@ class tx_scheduler_Module extends t3lib_SCbase {
                        }
                }
 
+               if ($this->CMD === 'add' || $this->CMD === 'edit') {
+                       $buttons['close'] = '<a href="#" onclick="document.location=\'' . $GLOBALS['MCONF']['_'] . '\'" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:cancel', TRUE) . '">' .
+                               t3lib_iconWorks::getSpriteIcon('actions-document-close') . '</a>';
+
+                       $buttons['save'] = t3lib_iconWorks::getSpriteIcon(
+                               'actions-document-save',
+                               array('html' => '<input type="image" name="data[save]" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:save', TRUE) . '" />')
+                       );
+               }
+
                return $buttons;
        }
 
@@ -1615,4 +1626,4 @@ class tx_scheduler_Module extends t3lib_SCbase {
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/scheduler/class.tx_scheduler_module.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/scheduler/class.tx_scheduler_module.php']);
 }
-?>
+?>
\ No newline at end of file
index 3665716..850c2a3 100644 (file)
@@ -27,7 +27,7 @@
 <!-- ###BUTTON_GROUP_WRAP### -->
 
 <!-- ###BUTTON_GROUPS_LEFT### -->
-<!-- ###BUTTON_GROUP1### -->###ADDTASK###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUP1### -->###ADDTASK######CLOSE######SAVE###<!-- ###BUTTON_GROUP1### -->
 <!-- ###BUTTON_GROUPS_LEFT### -->
 
 <!-- ###BUTTON_GROUPS_RIGHT### -->