Commit 2a957236 authored by damjan's avatar damjan
Browse files

[BUGFIX] There must be initial numSiteConstsSelection if session is empty

The problem was when the session is empty, until user makes some selection. In case of empty session (selection not in session), first item of numSiteConstsOptions is selected and saved to session.
Method 'assignViewWidthMenuVariables' does that and sends selection and options to view.
parent bf3df770
......@@ -77,6 +77,9 @@ class EditFileController extends AbstractBackendController {
$constantTypeOptions = $this->getConstantTypeOptions();
$this->assignViewWidthMenuVariables('constantType', $constantTypeOptions);
$extConfig = $this->configurationService->getExtConfig();
$this->assignViewWidthMenuVariables('numSiteConsts', $extConfig['numSiteConstsOptions']);
$this->prepareEditFileViewMainSectionContent($langData, $buttonType);
} catch (LFException $e) {
$this->addLFEFlashMessage($e);
......
......@@ -94,6 +94,9 @@ class ConfigurationService extends AbstractService {
$this->extConfig['numTextAreaRows'] = 5;
$this->extConfig['numSiteConsts'] = 6;
$this->extConfig['anzBackup'] = 5;
// Options for number of constants presented on EditFile page
$this->extConfig['numSiteConstsOptions']
= array('10' => 10, '20' => 20, '50' => 50, '100' => 100, '150' => 150, '200' => 200);
// paths and files (dont need to exist)
$this->extConfig['pathBackup'] = Typo3Lib::fixFilePath(
......
......@@ -6,7 +6,7 @@
</h2>
<f:form.select name="numSiteConstsSelection"
value="{numSiteConstsSelection}"
options="{10: 10, 20: 20, 50: 50, 100: 100, 150: 150, 200: 200}"
options="{numSiteConstsOptions}"
additionalAttributes="{onchange: 'submitForm(\'mainMenuForm\')'}"
/>
</lfe:extendedIf>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment