Index: typo3/stylesheet.css =================================================================== --- typo3/stylesheet.css (Revision 5342) +++ typo3/stylesheet.css (Arbeitskopie) @@ -599,16 +599,45 @@ - - - - - - - - - - - - - - - - - - - - - */ -table#typo3-userSettings td { +table.typo3-usersettings, table.typo3-usersettings tableĀ { + border-collapse: collapse; + border: 0; + padding: 0; + margin: 0; +} + +table.typo3-usersettings { + margin-top: 10px; +} + +table.typo3-usersettings td.td-label, +table.typo3-usersettings td.td-field { width: 300px; + padding: 5px 0 5px 5px; } -table#typo3-userSettings td.td-label-right { - padding-left: 30px; - width: 50px; +table.typo3-usersettings table.typo3-csh-inline { + margin: 10px 0 0 0; + padding: 0; + width: 100%; + border-left: 0; + border-right: 0; } +table.typo3-usersettings table.typo3-csh-inline tr:first-child { + width: 14px; +} +table.typo3-usersettings table.typo3-csh-inline a.typo3-csh-link { + margin: 0; +} + +table.typo3-usersettings a.typo3-csh-link { + display: block; + float: left; + margin-right: 5px; +} + /* - - - - - - - - - - - - - - - - - - - - - Logo frame (alt_toplogo.php) Index: typo3/sysext/setup/mod/index.php =================================================================== --- typo3/sysext/setup/mod/index.php (Revision 5342) +++ typo3/sysext/setup/mod/index.php (Arbeitskopie) @@ -251,12 +251,11 @@ $this->doc->tableLayout = array( 'defRow' => array( '0' => array('',''), - '2' => array('',''), - 'defCol' => array('','') + 'defCol' => array('','') ) ); $this->doc->table_TR = ''; - $this->doc->table_TABLE = ''; + $this->doc->table_TABLE = '
'; } /** @@ -282,7 +281,6 @@ } // Start page: - $menuItems = array(); $this->doc->loadJavascriptLib('md5.js'); // use a wrapper div @@ -302,197 +300,14 @@ } else { $this->content .= $this->doc->section($LANG->getLL('newPassword').':',$LANG->getLL('newPassword_failed'),1,0,2); } - $this->content .= $this->doc->spacer(25); } + // compile the menu item data + $data = $this->compileUserSetupData(); - // - // Personal data - // - // compile the languages dropdown - $languageOptions = array( - '000000000' => chr(10) . '' - ); - // traverse the number of languages - $theLanguages = t3lib_div::trimExplode('|', TYPO3_languages); - foreach ($theLanguages as $language) { - if ($language != 'default') { - $languageValue = $GLOBALS['LOCAL_LANG']['default']['lang_' . $language]; - $localLabel = ' - ['.htmlspecialchars($languageValue) . ']'; - $unavailable = (!is_dir(PATH_typo3conf . 'l10n/' . $language) ? true : false); - if (!$unavailable) { - $languageOptions[$languageValue . '--' . $language] = ' - '; - } - } - } - ksort($languageOptions); - $languageCode = ' - '; - if ($BE_USER->uc['lang'] && !@is_dir(PATH_typo3conf . 'l10n/' . $BE_USER->uc['lang'])) { - $languageCode .= '
'. - $this->doc->icons(3) . - 'The selected language is not available before the language pack is installed.
'. - ($BE_USER->isAdmin() ? 'You can use the Extension Manager to easily download and install new language packs.':'Please ask your system administrator to do this.') . - '
'; - } + // render the menu items + $menuItems = $this->renderUserSetupTabs($data); - - // the data for the user configuration (uc), - $data = array( - 'beUser_realName' => array( - 'type' => 'text', - 'form' => 'formWidth(20).' />', - ), - 'beUser_email' => array( - 'type' => 'text', - 'form' => 'formWidth(20).' />', - ), - 'emailMeAtLogin' => array( - 'type' => 'check', - 'form' => 'uc['emailMeAtLogin']?' checked="checked"':'').' />', - ), - 'newPassword' => array( - 'type' => 'password', - 'form' => 'formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\';" />', - ), - 'newPasswordAgain' => array( - 'type' => 'password', - 'form' => 'formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\'" />', - ), - 'language' => array( - 'type' => 'select', - 'form' => $languageCode, - ), - ); - $menuItems[] = $this->renderUserSetupTab($data, ($LANG->getLL('language') . ' & ' . $LANG->getLL('personal_data'))); - - - // - // compiling the 'Startup' section - // - - // start module select - if (empty($BE_USER->uc['startModule'])) { - $BE_USER->uc['startModule'] = $BE_USER->uc_default['startModule']; - } - $startModuleSelect .= ''; - foreach ($this->loadModules->modules as $mainMod => $modData) { - if (isset($modData['sub']) && is_array($modData['sub'])) { - $startModuleSelect .= ''; - foreach ($modData['sub'] as $subKey => $subData) { - $modName = $subData['name']; - $startModuleSelect .= ''; - } - } - } - $startModuleSelect = ''; - - - $data = array( - 'condensedMode' => array( - 'type' => 'checkbox', - 'form' => 'uc['condensedMode']?' checked="checked"':'').' />', - 'label' => 'condensedMode' - ), - 'noMenuMode' => array( - 'type' => 'select', - 'form' => '', - 'labelkey' => 'noMenuMode' - ), - 'startModule' => array( - 'type' => 'select', - 'form' => $startModuleSelect, - 'labelkey' => 'startModule' - ), - 'showThumbs' => array( - 'type' => 'check', - 'form' => 'uc['thumbnailsByDefault']?' checked="checked"':'').' />', - 'labelkey' => 'thumbnailsByDefault', - ), - 'helpText' => array( - 'type' => 'check', - 'form' => 'uc['helpText']?' checked="checked"':'').' />', - ), - 'edit_showFieldHelp' => array( - 'type' => 'select', - 'form' => '', - ), - 'maxTitleLen' => array( - 'type' => 'text', - 'form' => 'formWidth(5).' maxlength="5" />', - 'labelkey' => 'titleLen', - ), - - ); - - if ($GLOBALS['BE_USER']->uc['interfaceSetup'] != 'backend_old') { - unset($data['noMenuMode']); - } - $menuItems[] = $this->renderUserSetupTab($data, ($LANG->getLL('opening'))); - - - // - // Edit section & advanced options - // - - $data = array( - 'edit_RTE' => array( - 'type' => 'check', - 'form' => 'uc['edit_RTE']?' checked="checked"':'').' />', - ), - 'edit_docModuleUpload' => array( - 'type' => 'check', - 'form' => 'uc['edit_docModuleUpload']?' checked="checked"':'').' />' - ), - 'disableCMlayers' => array( - 'type' => 'check', - 'form' => 'uc['disableCMlayers']?' checked="checked"':'').' />' - ), - 'copyLevels' => array( - 'type' => 'text', - 'form' => 'formWidth(5).' maxlength="5" /> '.$LANG->getLL('levels') - ), - 'recursiveDelete' => array( - 'type' => 'check', - 'form' => 'uc['recursiveDelete']?' checked="checked"':'').' />', - ), - ); - - if (!$GLOBALS['TYPO3_CONF_VARS']['BE']['RTEenabled']) { - unset($data['edit_RTE']); - } - $menuItems[] = $this->renderUserSetupTab($data, ($LANG->getLL('edit_functions') . ' & ' . $LANG->getLL('functions'))); - - - // - // Admin functions - // - $data = array(); - if ($BE_USER->isAdmin()) { - // Simulate selector box: - if ($this->simulateSelector) { - $data['simulate'] = array( - 'type' => 'select', - 'form' => $this->simulateSelector, - 'csh' => 'simuser' - ); - } - $menuItems[] = $this->renderUserSetupTab($data, $LANG->getLL('adminFunctions')); - } - - // render the menu items; $this->content .= $this->doc->spacer(20) . $this->doc->getDynTabMenu($menuItems, 'user-setup', false, false, 100); @@ -580,6 +395,209 @@ } /** + * adds every field and every tab that will be used in a multi-dimensional array to be + * displayed in this module + * + * @return array the full data array that is used for rendering the tabs + */ + function compileUserSetupData() { + global $BE_USER, $LANG; + $data = array(); + + // Tab: Personal data + // compile the languages dropdown + $languageOptions = array( + '000000000' => chr(10) . '' + ); + // traverse the number of languages + $theLanguages = t3lib_div::trimExplode('|', TYPO3_languages); + foreach ($theLanguages as $language) { + if ($language != 'default') { + $languageValue = $GLOBALS['LOCAL_LANG']['default']['lang_' . $language]; + $localLabel = ' - ['.htmlspecialchars($languageValue) . ']'; + $unavailable = (!is_dir(PATH_typo3conf . 'l10n/' . $language) ? true : false); + if (!$unavailable) { + $languageOptions[$languageValue . '--' . $language] = ' + '; + } + } + } + ksort($languageOptions); + $languageCode = ' + '; + if ($BE_USER->uc['lang'] && !@is_dir(PATH_typo3conf . 'l10n/' . $BE_USER->uc['lang'])) { + $languageCode .= '
'. + $this->doc->icons(3) . + 'The selected language is not available before the language pack is installed.
'. + ($BE_USER->isAdmin() ? 'You can use the Extension Manager to easily download and install new language packs.':'Please ask your system administrator to do this.') . + '
'; + } + + + // the data for the user configuration (uc), + $data['personal_data'] = array( + 'ctrl' => array( + 'label' => $LANG->getLL('personal_data'), + ), + 'columns' => array( + 'beUser_realName' => array( + 'type' => 'text', + 'form' => 'formWidth(20).' />', + ), + 'beUser_email' => array( + 'type' => 'text', + 'form' => 'formWidth(20).' />', + ), + 'emailMeAtLogin' => array( + 'type' => 'check', + 'form' => 'uc['emailMeAtLogin']?' checked="checked"':'').' />', + ), + 'newPassword' => array( + 'type' => 'password', + 'form' => 'formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\';" />', + ), + 'newPasswordAgain' => array( + 'type' => 'password', + 'form' => 'formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\'" />', + ), + 'language' => array( + 'type' => 'select', + 'form' => $languageCode, + ), + ) + ); + + + // Tab: compiling the 'Startup' section + // start module select + if (empty($BE_USER->uc['startModule'])) { + $BE_USER->uc['startModule'] = $BE_USER->uc_default['startModule']; + } + $startModuleSelect .= ''; + foreach ($this->loadModules->modules as $mainMod => $modData) { + if (isset($modData['sub']) && is_array($modData['sub'])) { + $startModuleSelect .= ''; + foreach ($modData['sub'] as $subKey => $subData) { + $modName = $subData['name']; + $startModuleSelect .= ''; + } + } + } + $startModuleSelect = ''; + + $data['startup'] = array( + 'ctrl' => array( + 'label' => $LANG->getLL('opening'), + ), + 'columns' => array( + 'condensedMode' => array( + 'type' => 'checkbox', + 'form' => 'uc['condensedMode']?' checked="checked"':'').' />', + 'label' => 'condensedMode' + ), + 'noMenuMode' => array( + 'type' => 'select', + 'form' => '', + 'labelkey' => 'noMenuMode' + ), + 'startModule' => array( + 'type' => 'select', + 'form' => $startModuleSelect, + 'labelkey' => 'startModule' + ), + 'showThumbs' => array( + 'type' => 'check', + 'form' => 'uc['thumbnailsByDefault']?' checked="checked"':'').' />', + 'labelkey' => 'thumbnailsByDefault', + ), + 'helpText' => array( + 'type' => 'check', + 'form' => 'uc['helpText']?' checked="checked"':'').' />', + ), + 'edit_showFieldHelp' => array( + 'type' => 'select', + 'form' => '', + ), + 'maxTitleLen' => array( + 'type' => 'text', + 'form' => 'formWidth(5).' maxlength="5" />', + 'labelkey' => 'titleLen', + ), + ) + ); + + if ($GLOBALS['BE_USER']->uc['interfaceSetup'] != 'backend_old') { + unset($data['startup']['columns']['noMenuMode']); + } + + + // Tab: Edit section & advanced options + $data['edit'] = array( + 'ctrl' => array( + 'label' => $LANG->getLL('edit_functions') . ' & ' . $LANG->getLL('functions'), + ), + 'columns' => array( + 'edit_RTE' => array( + 'type' => 'check', + 'form' => 'uc['edit_RTE']?' checked="checked"':'').' />', + ), + 'edit_docModuleUpload' => array( + 'type' => 'check', + 'form' => 'uc['edit_docModuleUpload']?' checked="checked"':'').' />' + ), + 'disableCMlayers' => array( + 'type' => 'check', + 'form' => 'uc['disableCMlayers']?' checked="checked"':'').' />' + ), + 'copyLevels' => array( + 'type' => 'text', + 'form' => 'formWidth(5).' maxlength="5" /> '.$LANG->getLL('levels') + ), + 'recursiveDelete' => array( + 'type' => 'check', + 'form' => 'uc['recursiveDelete']?' checked="checked"':'').' />', + ), + ) + ); + + if (!$GLOBALS['TYPO3_CONF_VARS']['BE']['RTEenabled']) { + unset($data['edit']['columns']['edit_RTE']); + } + + + // Tab: Admin functions + if ($BE_USER->isAdmin()) { + $data['admin'] = array( + 'ctrl' => array( + 'label' => $LANG->getLL('adminFunctions') + ), + 'columns' => array() + ); + // Simulate selector box: + if ($this->simulateSelector) { + $data['admin']['columns']['simulate'] = array( + 'type' => 'select', + 'form' => $this->simulateSelector, + 'csh' => 'simuser' + ); + } + } + + return $data; + } + + /** * renders the data for one tab in the user setup and returns * everything that is needed to have a complete tab * for the dyntab menu @@ -587,30 +605,40 @@ * @param $tabLabel the label that is put on top of the tab array * @return ready to use for the dyntabmenu itemarray */ - function renderUserSetupTab($data, $tabLabel) { - $code = array(); - $i = 0; + function renderUserSetupTabs($data) { + $result = array(); + foreach ($data as $k => $tabData) { + $code = array(); + $i = 0; - // display full help is active? - $displayFullText = ($GLOBALS['BE_USER']->uc['edit_showFieldHelp'] == 'text'); - if ($displayFullText) { - $this->doc->tableLayout['defRowEven'] = array('defCol' => array ('','')); - } - - foreach ($data as $fieldname => $data) { - // add another table row with the full text help if needed + // "display full help" is active? + $displayFullText = ($GLOBALS['BE_USER']->uc['edit_showFieldHelp'] == 'text'); if ($displayFullText) { - $code[$i++][1] = $this->getCSH($data['csh'] ? $data['csh'] : $fieldname); + $this->doc->tableLayout['defRowEven'] = array('defCol' => array('','')); } - $code[$i][1] = $this->setLabel($fieldname, ($data['labelkey'] ? $data['labelkey'] : '')); - $code[$i][2] = $data['form']; - $code[$i++][3] = !$displayFullText ? $this->getCSH($data['csh'] ? $data['csh'] : $fieldname) : ' '; + + foreach ($tabData['columns'] as $fieldname => $data) { + $csh = $this->getCSH($data['csh'] ? $data['csh'] : $fieldname); + // add another table row with the full text help if needed + if ($displayFullText) { + $code[$i++][1] = $csh; + } + + $code[$i][1] = $this->setLabel($fieldname, ($data['labelkey'] ? $data['labelkey'] : '')); + if (!$displayFullText) { + $code[$i][1] = $csh . $code[$i][1]; + } + $code[$i++][2] = $data['form']; + } + + if (count($code)) { + $result[] = array( + 'label' => $tabData['ctrl']['label'], + 'content' => $this->doc->table($code) + ); + } } - - return array( - 'label' => $tabLabel, - 'content' => $this->doc->spacer(20) . $this->doc->table($code) - ); + return $result; } /** @@ -634,14 +662,14 @@ // Make user-selector: $users = t3lib_BEfunc::getUserNames('username,usergroup,usergroup_cached_list,uid,realName'); $opt = array(); - reset($users); - $opt[] = ''; - while(list(,$rr)=each($users)) { - if ($rr['uid']!=$BE_USER->user['uid']) { + foreach ($users as $rr) { + if ($rr['uid'] != $BE_USER->user['uid']) { $opt[] = ''; } } - $this->simulateSelector = ''; + if (count($opt)) { + $this->simulateSelector = ''; + } } if ($this->simUser>0) { // This can only be set if the previous code was executed.