Index: typo3/sysext/tstemplate/ts/index.php
===================================================================
--- typo3/sysext/tstemplate/ts/index.php (revision 3849)
+++ typo3/sysext/tstemplate/ts/index.php (working copy)
@@ -235,7 +235,9 @@
$buttons = array(
'back' => '',
'close' => '',
+ 'new' => '',
'save' => '',
+ 'save_close' => '',
'view' => '',
'record_list' => '',
'shortcut' => '',
@@ -256,11 +258,19 @@
}
if($this->extClassConf['name'] == 'tx_tstemplateinfo') {
- if(!empty($this->e) && !t3lib_div::_POST('abort')) {
+ // NEW button
+ $buttons['new'] = '';
+
+ if(!empty($this->e) && !t3lib_div::_POST('abort') && !t3lib_div::_POST('saveclose')) {
// SAVE button
$buttons['save'] = '';
+
+ // SAVE AND CLOSE button
+ $buttons['save_close'] = '';
+
// CLOSE button
$buttons['close'] = '';
+
}
} elseif($this->extClassConf['name'] == 'tx_tstemplateceditor' && count($this->MOD_MENU['constant_editor_cat'])) {
// SAVE button
Index: typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php
===================================================================
--- typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php (revision 3849)
+++ typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php (working copy)
@@ -189,7 +189,8 @@
// Update template ?
$POST = t3lib_div::_POST();
- if ($POST['submit'] || (t3lib_div::testInt($POST['submit_x']) && t3lib_div::testInt($POST['submit_y']))) {
+ if ($POST['submit'] || (t3lib_div::testInt($POST['submit_x']) && t3lib_div::testInt($POST['submit_y']))
+ || $POST['saveclose'] || (t3lib_div::testInt($POST['saveclose_x']) && t3lib_div::testInt($POST['saveclose_y']))) {
require_once(PATH_t3lib.'class.t3lib_tcemain.php');
// Set the data to be saved
$recData = array();
@@ -334,8 +335,9 @@
$numberOfRows = 35;
// If abort pressed, nothing should be edited:
- if ($POST['abort'] || (t3lib_div::testInt($POST['abort_x']) && t3lib_div::testInt($POST['abort_y']))) {
- unset($e);
+ if ($POST['abort'] || (t3lib_div::testInt($POST['abort_x']) && t3lib_div::testInt($POST['abort_y']))
+ || $POST['saveclose'] || (t3lib_div::testInt($POST['saveclose_x']) && t3lib_div::testInt($POST['saveclose_y']))) {
+ unset($e);
}
if ($e['title']) {
@@ -492,4 +494,4 @@
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']);
}
-?>
\ No newline at end of file
+?>
Index: typo3/templates/tstemplate.html
===================================================================
--- typo3/templates/tstemplate.html (revision 3849)
+++ typo3/templates/tstemplate.html (working copy)
@@ -27,9 +27,9 @@
-###BACK###
+###BACK######NEW###
###CLOSE###
-###SAVE###
+###SAVE######SAVE_CLOSE###
###VIEW###