Bug #19022 » 8830_template_saveclose_2.diff
typo3/templates/tstemplate.html (working copy) | ||
---|---|---|
<!-- ###BUTTON_GROUPS_LEFT### -->
|
||
<!-- ###BUTTON_GROUP1### -->###BACK###<!-- ###BUTTON_GROUP1### -->
|
||
<!-- ###BUTTON_GROUP2### -->###CLOSE###<!-- ###BUTTON_GROUP2### -->
|
||
<!-- ###BUTTON_GROUP3### -->###SAVE###<!-- ###BUTTON_GROUP3### -->
|
||
<!-- ###BUTTON_GROUP3### -->###SAVE######SAVE_CLOSE###<!-- ###BUTTON_GROUP3### -->
|
||
<!-- ###BUTTON_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->
|
||
<!-- ###BUTTON_GROUPS_LEFT### -->
|
||
typo3/sysext/tstemplate/ts/index.php (working copy) | ||
---|---|---|
'back' => '',
|
||
'close' => '',
|
||
'save' => '',
|
||
'save_close' => '',
|
||
'view' => '',
|
||
'record_list' => '',
|
||
'shortcut' => '',
|
||
... | ... | |
}
|
||
if($this->extClassConf['name'] == 'tx_tstemplateinfo') {
|
||
if(!empty($this->e) && !t3lib_div::_POST('abort')) {
|
||
if(!empty($this->e) && !t3lib_div::_POST('abort') && !t3lib_div::_POST('saveclose')) {
|
||
// SAVE button
|
||
$buttons['save'] = '<input type="image" class="c-inputButton" name="submit" value="Update"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/savedok.gif','') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" />';
|
||
// SAVE AND CLOSE button
|
||
$buttons['save_close'] = '<input type="image" class="c-inputButton" name="saveclose" value="Save and close"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/saveandclosedok.gif', '') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc',1) . '" />';
|
||
// CLOSE button
|
||
$buttons['close'] = '<input type="image" class="c-inputButton" name="abort" value="Abort"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/closedok.gif','') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '" />';
|
||
}
|
typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php (working copy) | ||
---|---|---|
// 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();
|
||
... | ... | |
$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']) {
|
||
... | ... | |
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']);
|
||
}
|
||
?>
|
||
?>
|