Project

General

Profile

Feature #15296 ยป 8830_template_saveclose_3.diff

Administrator Admin, 2008-06-28 11:53

View differences:

typo3/sysext/tstemplate/ts/index.php (working copy)
$buttons = array(
'back' => '',
'close' => '',
'new' => '',
'save' => '',
'save_close' => '',
'view' => '',
'record_list' => '',
'shortcut' => '',
......
}
if($this->extClassConf['name'] == 'tx_tstemplateinfo') {
if(!empty($this->e) && !t3lib_div::_POST('abort')) {
// NEW button
$buttons['new'] = '<input type="image" class="c-inputButton" name="createExtension" value="New"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/new_el.gif','') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:db_new.php.pagetitle', 1) . '" />';
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) . '" />';
}
} elseif($this->extClassConf['name'] == 'tx_tstemplateceditor' && count($this->MOD_MENU['constant_editor_cat'])) {
// SAVE button
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_GROUP_WRAP### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUP1### -->###BACK###<!-- ###BUTTON_GROUP1### -->
<!-- ###BUTTON_GROUP1### -->###BACK######NEW###<!-- ###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/1)