2009-09-19 Steffen Kamper <info@sk-typo3.de>
+ * Fixed bug #11884: User setup: buttons for create/delete ENABLE_INSTALL_TOOL-file are not integrated in user setup
* Fixed bug #11896: User Setup miss save of be_users fields and miss handling of default value
2009-09-19 Ingo Renner <ingo@typo3.org>
'label' => 'LLL:EXT:setup/mod/locallang.xml:resizeTextareas_Flexible',
'csh' => 'resizeTextareas_Flexible',
),
+ 'installToolEnableButton' => array(
+ 'type' => 'user',
+ 'label' => 'LLL:EXT:setup/mod/locallang.xml:enableInstallTool.label',
+ 'userFunc' => 'SC_mod_user_setup_index->renderInstallToolEnableFileButton',
+ 'access' => 'admin',
+ 'csh' => 'enableInstallTool'
+ ),
),
'showitem' => '--div--;LLL:EXT:setup/mod/locallang.xml:personal_data,realName,email,emailMeAtLogin,password,password2,lang,
--div--;LLL:EXT:setup/mod/locallang.xml:opening,condensedMode,noMenuMode,startModule,thumbnailsByDefault,helpText,edit_showFieldHelp,titleLen,
--div--;LLL:EXT:setup/mod/locallang.xml:editFunctionsTab,edit_RTE,edit_wideDocument,edit_docModuleUpload,enableFlashUploader,resizeTextareas,resizeTextareas_MaxHeight,resizeTextareas_Flexible,disableCMlayers,copyLevels,recursiveDelete,
- --div--;LLL:EXT:setup/mod/locallang.xml:adminFunctions,simulate'
+ --div--;LLL:EXT:setup/mod/locallang.xml:adminFunctions,simulate,installToolEnableButton'
);
?>
\ No newline at end of file
<label index="reset.details">This does not apply to user name, email and password settings of course.</label>
<label index="simuser.alttitle">Simulate backend user</label>
<label index="simuser.description">This option allows "admin"-users to change settings for another backend user in the system.</label>
+ <label index="option_enableInstallTool.alttitle">Admin control for re-enabling Install Tool access</label>
+ <label index="option_enableInstallTool.description">By clicking this button, a file typo3conf/ENABLE_INSTALL_TOOL is created (or removed if it already exists). It unlocks the access to the Install Tool (password is still needed!) and will be removed automatically after 1 hour.</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
<input type="submit" name="data[clearSessionVars]" value="'.$LANG->getLL('clearSessionVars').'" />'
);
- // Install Tool access file
- if ($this->isAdmin) {
- $installToolEnableFileExists = is_file(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
- $installToolEnableButton = $installToolEnableFileExists ?
- '<input type="submit" name="deleteInstallToolEnableFile" value="' . $LANG->getLL('enableInstallTool.deleteFile') . '" />' :
- '<input type="submit" name="createInstallToolEnableFile" value="' . $LANG->getLL('enableInstallTool.createFile') . '" />';
-
- $this->content .= $this->doc->spacer(30);
- $this->content .= $this->doc->section($LANG->getLL('enableInstallTool.headerTitle'),
- $LANG->getLL('enableInstallTool.description')
- );
- $this->content .= $this->doc->spacer(10);
- $this->content .= $this->doc->section('',
- $installToolEnableButton
- );
- }
+
// Notice
$this->content .= $this->doc->spacer(30);
return '<select id="field_startModule" name="data[startModule]" class="select">' . $startModuleSelect . '</select>';
}
-
+ /**
+ *
+ * @param array $params config of the field
+ * @param SC_mod_user_setup_index $parent this class as reference
+ * @return string html with description and button
+ */
+ public function renderInstallToolEnableFileButton(array $params, SC_mod_user_setup_index $parent) {
+ // Install Tool access file
+ $installToolEnableFileExists = is_file(PATH_typo3conf . 'ENABLE_INSTALL_TOOL');
+ if ($installToolEnableFileExists) {
+ return '<input type="submit" name="deleteInstallToolEnableFile" value="' . $GLOBALS['LANG']->sL('LLL:EXT:setup/mod/locallang.xml:enableInstallTool.deleteFile') . '" />';
+ } else {
+ return '<input type="submit" name="createInstallToolEnableFile" value="' . $GLOBALS['LANG']->sL('LLL:EXT:setup/mod/locallang.xml:enableInstallTool.createFile') . '" />';
+ }
+ }
/**
* Will make the simulate-user selector if the logged in user is administrator.
if (!t3lib_div::inList('language,simuser', $str)) {
$str = 'option_' . $str;
}
- return t3lib_BEfunc::cshItem('_MOD_user_setup', $str, $GLOBALS['BACK_PATH'], '|', false, 'margin-bottom:0px;');
+ return t3lib_BEfunc::cshItem('_MOD_user_setup', $str, $this->doc->backPath, '|', false, 'margin-bottom:0px;');
}
}
<label index="newPassword_ok">Password was updated</label>
<label index="newPassword_failed">Password was NOT updated because you didn't enter the same password twice.</label>
<label index="adminFunctions">Admin functions</label>
- <label index="enableInstallTool.headerTitle">Admin control for re-enabling Install Tool access</label>
- <label index="enableInstallTool.description">By clicking this button, a file typo3conf/ENABLE_INSTALL_TOOL is created (or removed if it already exists).<br />It unlocks the access to the Install Tool (password is still needed!) and will be removed automatically after 1 hour.</label>
+ <label index="enableInstallTool.label">Install Tool Access</label>
<label index="enableInstallTool.createFile">Create Install Tool Enable File</label>
<label index="enableInstallTool.deleteFile">Delete Install Tool Enable File</label>
</languageKey>