reintroduced the save button in user settings, removed navigation mode option when...
authorIngo Renner <ingo.renner@typo3.org>
Mon, 3 Mar 2008 12:48:26 +0000 (12:48 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Mon, 3 Mar 2008 12:48:26 +0000 (12:48 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3353 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/setup/mod/index.php

index 0eeef17..9d80032 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        * Added feature #7140: EM should send TYPO3 version when connecting to TER, credits Niels Pardon
        * Fixed bug #7704: Image Position in Text/Image doesn't work, redits Steffen Kamper
        * Fixed bug #7713: EM - Translation Manager loose CSS while updating, credits Steffen Kamper
+       * reintroduced the save button in user settings, removed navigation mode option when not in backend_old
 
 2008-03-03  Dmitry Dulepov  <dmitry@typo3.org>
 
index 4554413..2411596 100755 (executable)
@@ -286,10 +286,10 @@ class SC_mod_user_setup_index {
                        // Start page:
                $menuItems = array();
                $this->doc->loadJavascriptLib('md5.js');
-                       
+
                        // use a wrapper div
                $this->content .= '<div id="user-setup-wrapper">';
-               
+
                        // Load available backend modules
                $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
                $this->loadModules->observeWorkspaces = TRUE;
@@ -313,23 +313,23 @@ class SC_mod_user_setup_index {
                $code[1][1] = $this->setLabel('beUser_realName');
                $code[1][2] = '<input id="field_beUser_realName" type="text" name="ext_beuser[realName]" value="'.htmlspecialchars($BE_USER->user['realName']).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' />';
                $code[1][3] = $this->getCSH('beUser_realName');
-               
+
                $code[2][1] = $this->setLabel('beUser_email');
                $code[2][2] = '<input id="field_beUser_email" type="text" name="ext_beuser[email]" value="'.htmlspecialchars($BE_USER->user['email']).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' />';
                $code[2][3] = $this->getCSH('beUser_email');
-               
+
                $code[3][1] = $this->setLabel('emailMeAtLogin').($BE_USER->user['email'] ? ' ('.$BE_USER->user['email'].')' : '');
                $code[3][2] = '<input id="field_emailMeAtLogin" type="checkbox" name="data[emailMeAtLogin]"'.($BE_USER->uc['emailMeAtLogin']?' checked="checked"':'').' />';
                $code[3][3] = $this->getCSH('emailMeAtLogin');
-               
+
                $code[4][1] = $this->setLabel('newPassword');
                $code[4][2] = '<input id="field_newPassword" type="password" name="ext_beuser[password1]" value=""'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\';" />';
                $code[4][3] = $this->getCSH('newPassword');
-               
+
                $code[5][1] = $this->setLabel('newPasswordAgain');
                $code[5][2] = '<input id="field_newPasswordAgain" type="password" name="ext_beuser[password2]" value=""'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\'" />';
                $code[5][3] = $this->getCSH('newPasswordAgain');
-               
+
                        // Languages:
                $opt = array();
                $opt['000000000']='
@@ -365,7 +365,7 @@ class SC_mod_user_setup_index {
                $code[6][1] = $this->setLabel('language');
                $code[6][2] = $languageCode;
                $code[6][3] = t3lib_BEfunc::cshItem('_MOD_user_setup', 'language', $BACK_PATH, '|');
-               
+
                $menuItems[] = array(
                                'label'   => $LANG->getLL('language').' & '.$LANG->getLL('personal_data'),
                                'content' => $this->doc->spacer(20).$this->doc->table($code)
@@ -379,15 +379,17 @@ class SC_mod_user_setup_index {
                $code[2][1] = $this->setLabel('condensedMode','condensedMode');
                $code[2][2] = '<input id="field_condensedMode" type="checkbox" name="data[condensedMode]"'.($BE_USER->uc['condensedMode']?' checked="checked"':'').' />';
                $code[2][3] = $this->getCSH('condensedMode');
-               
-               $code[3][1] = $this->setLabel('noMenuMode','noMenuMode');
-               $code[3][2] = '<select id="field_noMenuMode" name="data[noMenuMode]">
-                       <option value=""'.(!$BE_USER->uc['noMenuMode']?' selected="selected"':'').'>'.$LANG->getLL('noMenuMode_def').'</option>
-                       <option value="1"'.($BE_USER->uc['noMenuMode'] && (string)$BE_USER->uc['noMenuMode']!="icons"?' selected="selected"':'').'>'.$LANG->getLL('noMenuMode_sel').'</option>
-                       <option value="icons"'.((string)$BE_USER->uc['noMenuMode']=='icons'?' selected="selected"':'').'>'.$LANG->getLL('noMenuMode_icons').'</option>
-               </select>';
-               $code[3][3] = $this->getCSH('noMenuMode');
-               
+
+               if($GLOBALS['BE_USER']->uc['interfaceSetup'] == 'backend_old') {
+                       $code[3][1] = $this->setLabel('noMenuMode','noMenuMode');
+                       $code[3][2] = '<select id="field_noMenuMode" name="data[noMenuMode]">
+                               <option value=""'.(!$BE_USER->uc['noMenuMode']?' selected="selected"':'').'>'.$LANG->getLL('noMenuMode_def').'</option>
+                               <option value="1"'.($BE_USER->uc['noMenuMode'] && (string)$BE_USER->uc['noMenuMode']!="icons"?' selected="selected"':'').'>'.$LANG->getLL('noMenuMode_sel').'</option>
+                               <option value="icons"'.((string)$BE_USER->uc['noMenuMode']=='icons'?' selected="selected"':'').'>'.$LANG->getLL('noMenuMode_icons').'</option>
+                       </select>';
+                       $code[3][3] = $this->getCSH('noMenuMode');
+               }
+
                $code[4][1] = $this->setLabel('startModule','startModule');
                $modSelect = '<select id="field_startModule" name="data[startModule]">';
                $modSelect .= '<option value=""></option>';
@@ -407,15 +409,15 @@ class SC_mod_user_setup_index {
                $modSelect .= '</select>';
                $code[4][2] = $modSelect;
                $code[4][3] = $this->getCSH('startModule');
-               
+
                $code[5][1] = $this->setLabel('showThumbs','thumbnailsByDefault');
                $code[5][2] = '<input id="field_showThumbs" type="checkbox" name="data[thumbnailsByDefault]"'.($BE_USER->uc['thumbnailsByDefault']?' checked="checked"':'').' />';
                $code[5][3] = $this->getCSH('showThumbs');
-               
+
                $code[6][1] = $this->setLabel('helpText');
                $code[6][2] = '<input id="field_helpText" type="checkbox" name="data[helpText]"'.($BE_USER->uc['helpText']?' checked="checked"':'').' />';
                $code[6][3] = $this->getCSH('helpText');
-               
+
                $code[7][1] = $this->setLabel('edit_showFieldHelp');
                $code[7][2] = '<select id="field_edit_showFieldHelp" name="data[edit_showFieldHelp]">
                        <option value="">'.$LANG->getLL('edit_showFieldHelp_none').'</option>
@@ -423,11 +425,11 @@ class SC_mod_user_setup_index {
                        <option value="text"'.($BE_USER->uc['edit_showFieldHelp']=='text'?' selected="selected"':'').'>'.$LANG->getLL('edit_showFieldHelp_message').'</option>
                </select>';
                $code[7][3] = $this->getCSH('edit_showFieldHelp');
-               
+
                $code[8][1] = $this->setLabel('maxTitleLen','titleLen');
                $code[8][2] = '<input id="field_maxTitleLen" type="text" name="data[titleLen]" value="'.$BE_USER->uc['titleLen'].'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(5).' maxlength="5" />';
                $code[8][3] = $this->getCSH('maxTitleLen');
-               
+
                $menuItems[] = array(
                                'label' => $LANG->getLL('opening'),
                                'content' => $this->doc->spacer(20).$this->doc->table($code)
@@ -444,7 +446,7 @@ class SC_mod_user_setup_index {
                $code[4][1] = $this->setLabel('edit_docModuleUpload');
                $code[4][2] = '<input id="field_edit_docModuleUpload" type="checkbox" name="data[edit_docModuleUpload]"'.($BE_USER->uc['edit_docModuleUpload']?' checked="checked"':'').' />';
                $code[4][3] = $this->getCSH('edit_docModuleUpload');
-               
+
                $code[6][1] = $this->setLabel('disableCMlayers');
                $code[6][2] = '<input id="field_disableCMlayers" type="checkbox" name="data[disableCMlayers]"'.($BE_USER->uc['disableCMlayers']?' checked="checked"':'').' />';
                $code[6][3] = $this->getCSH('disableCMlayers');
@@ -454,11 +456,11 @@ class SC_mod_user_setup_index {
                $code[8][1] = $this->setLabel('copyLevels');
                $code[8][2] = '<input id="field_copyLevels" type="text" name="data[copyLevels]" value="'.$BE_USER->uc['copyLevels'].'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(5).' maxlength="5" />&nbsp;'.$LANG->getLL('levels');
                $code[8][3] = $this->getCSH('copyLevels');
-               
+
                $code[10][1] = $this->setLabel('recursiveDelete');
                $code[10][2] = '<input id="field_recursiveDelete" type="checkbox" name="data[recursiveDelete]"'.($BE_USER->uc['recursiveDelete']?' checked="checked"':'').' />';
                $code[10][3] = $this->getCSH('recursiveDelete');
-               
+
                $menuItems[] = array(
                                'label'   => $LANG->getLL('edit_functions') . ' & ' . $LANG->getLL('functions'),
                                'content' => $this->doc->spacer(20).$this->doc->table($code)
@@ -486,25 +488,26 @@ class SC_mod_user_setup_index {
                $this->content .= $this->doc->spacer(20);
                $this->content .= $this->doc->section('','
                        <input type="hidden" name="simUser" value="'.$this->simUser.'" />
+                       <input type="submit" name="submit" value="'.$LANG->getLL('save').'" />
                        <input type="submit" name="data[setValuesToDefault]" value="'.$LANG->getLL('setToStandard').'" onclick="return confirm(\''.$LANG->getLL('setToStandardQuestion').'\');" />'.
                        t3lib_BEfunc::cshItem('_MOD_user_setup', 'reset', $BACK_PATH,'|')
                );
-               
+
                        // Notice
                $this->content .= $this->doc->spacer(30);
                $this->content .= $this->doc->section('', $LANG->getLL('activateChanges'));
-               
+
                        // Setting up the buttons and markers for docheader
                $docHeaderButtons = $this->getButtons();
                $markers['CSH'] = $docHeaderButtons['csh'];
                $markers['CONTENT'] = $this->content;
-                       
+
                        // Build the <body> for the module
                $this->content = $this->doc->startPage($LANG->getLL('UserSettings'));
                $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
                $this->content.= $this->doc->endPage();
                $this->content = $this->doc->insertStylesAndJS($this->content);
-               
+
                        // end of wrapper div
                $this->content .= '</div>';
        }
@@ -525,7 +528,7 @@ class SC_mod_user_setup_index {
         */
        private function getButtons()   {
                global $LANG, $BACK_PATH, $BE_USER;
-               
+
                $buttons = array(
                        'csh' => '',
                        'save' => '',
@@ -534,15 +537,12 @@ class SC_mod_user_setup_index {
 
                        //CSH
                $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_user_setup', '', $BACK_PATH, '|');
-               
-                       // Save
-               $buttons['save'] = '<input type="image" class="c-inputButton" name="submit" value="' . $LANG->getLL('save') . '"' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/savedok.gif','') . ' title="' . $LANG->getLL('save') . '" />';
 
                if ($BE_USER->mayMakeShortcut())        {
                                // Shortcut
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon('','',$this->MCONF['name']);
                }
-                       
+
                return $buttons;
        }
 
@@ -634,7 +634,7 @@ class SC_mod_user_setup_index {
                }
                return $out;
        }
-       
+
        /**
         * Returns the CSH Icon for given string
         *