Project

General

Profile

Bug #19022 » 8830_template_saveclose.diff

Administrator Admin, 2008-06-26 18:36

View differences:

typo3/sysext/tstemplate/ts/index.php (working copy)
'back' => '',
'close' => '',
'save' => '',
'save_close' => '',
'view' => '',
'record_list' => '',
'shortcut' => '',
);
if ($this->id && $this->access) {
$onClickView =
// View page
$buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
'<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
......
}
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) . '" />';
$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) . '" />';
}
} elseif($this->extClassConf['name'] == 'tx_tstemplateceditor' && count($this->MOD_MENU['constant_editor_cat'])) {
// 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) . '" />';
} elseif($this->extClassConf['name'] == 'tx_tstemplateobjbrowser') {
if(!empty($this->sObj)) {
// BACK
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']);
}
?>
?>
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### -->
(1-1/3)