Commit 1f0e0a30 authored by damjan's avatar damjan

[BUGFIX] Not using word 'default' as legend label.

Also, fluid code is refactored.
parent 35e09c90
......@@ -18,31 +18,18 @@
<f:form id="contentForm" action="editConstantSave">
<f:for each="{languages}" key="lang" as="constValue" iteration="iterator">
<fieldset class="tx-lfeditor-fieldset bgColor5 {f:if(condition: iterator.isEven, then: 'tx-lfeditor-fright', else: 'tx-lfeditor-fleft')}">
<f:if condition="{lang} == {defaultLanguage}">
<legend class="bgColor3">{lang}</legend>
<lfe:extendedIf condition="{lang} == {defaultLanguage}" and="{defaultLanguagePermission} != 'TRUE'">
<f:then>
<legend class="bgColor3">default</legend>
<f:if condition="{defaultLanguagePermission}">
<f:then>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue}"
name="editConstTextArea[{lang}][{constantSelection}]"
lang="{lang}"
class="tx-lfeditor-textarea" />
</f:then>
<f:else>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue}"
name="editConstTextArea[{lang}][{constantSelection}]"
lang="{lang}"
additionalAttributes="{readonly: ''}"
class="tx-lfeditor-textarea" />
</f:else>
</f:if>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue}"
name="editConstTextArea[{lang}][{constantSelection}]"
lang="{lang}"
additionalAttributes="{readonly: ''}"
class="tx-lfeditor-textarea" />
</f:then>
<f:else>
<legend class="bgColor3">{lang}</legend>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue}"
......@@ -50,7 +37,7 @@
lang="{lang}"
class="tx-lfeditor-textarea" />
</f:else>
</f:if>
</lfe:extendedIf>
</fieldset>
</f:for>
......
......@@ -44,31 +44,18 @@
<f:for each="{constValues}" key="constKey" as="constValue" iteration="iterator">
<fieldset class="tx-lfeditor-fieldset bgColor5 {lfe:extendedIf(condition: iterator.isOdd, or: parallelEdit, then: 'tx-lfeditor-fleft', else: 'tx-lfeditor-fright')}">
<f:if condition="{languageSelection} == {defaultLanguage}">
<legend class="bgColor3">{languageSelection}:{constKey}</legend>
<lfe:extendedIf condition="{languageSelection} == {defaultLanguage}" and="{defaultLanguagePermission} != 'TRUE'">
<f:then>
<legend class="bgColor3">default:{constKey}</legend>
<f:if condition="{defaultLanguagePermission}">
<f:then>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.edit}"
name="editFileTextArea[{languageSelection}][{constKey}]"
lang="{languageSelection}"
class="tx-lfeditor-textarea" />
</f:then>
<f:else>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.edit}"
name="editFileTextArea[{languageSelection}][{constKey}]"
lang="{languageSelection}"
additionalAttributes="{readonly: ''}"
class="tx-lfeditor-textarea" />
</f:else>
</f:if>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.edit}"
name="editFileTextArea[{languageSelection}][{constKey}]"
lang="{languageSelection}"
additionalAttributes="{readonly: ''}"
class="tx-lfeditor-textarea" />
</f:then>
<f:else>
<legend class="bgColor3">{languageSelection}:{constKey}</legend>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.edit}"
......@@ -76,7 +63,7 @@
lang="{languageSelection}"
class="tx-lfeditor-textarea" />
</f:else>
</f:if>
</lfe:extendedIf>
<f:if condition="{constValue.default}">
<p class="tx-lfeditor-defaultTranslation bgColor3">
{constValue.default}
......@@ -85,31 +72,18 @@
</fieldset>
<f:if condition="{parallelEdit}">
<fieldset class="tx-lfeditor-fieldset bgColor5 tx-lfeditor-fright">
<f:if condition="{referenceLanguageSelection} == {defaultLanguage}">
<legend class="bgColor3">{referenceLanguageSelection}:{constKey}</legend>
<lfe:extendedIf condition="{referenceLanguageSelection} == {defaultLanguage}" and="{defaultLanguagePermission} != 'TRUE'">
<f:then>
<legend class="bgColor3">default:{constKey}</legend>
<f:if condition="{defaultLanguagePermission}">
<f:then>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.pattern}"
name="editFileTextArea[{referenceLanguageSelection}][{constKey}]"
lang="{referenceLanguageSelection}"
class="tx-lfeditor-textarea" />
</f:then>
<f:else>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.pattern}"
name="editFileTextArea[{referenceLanguageSelection}][{constKey}]"
lang="{referenceLanguageSelection}"
additionalAttributes="{readonly: ''}"
class="tx-lfeditor-textarea" />
</f:else>
</f:if>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.pattern}"
name="editFileTextArea[{referenceLanguageSelection}][{constKey}]"
lang="{referenceLanguageSelection}"
additionalAttributes="{readonly: ''}"
class="tx-lfeditor-textarea" />
</f:then>
<f:else>
<legend class="bgColor3">{referenceLanguageSelection}:{constKey}</legend>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
value="{constValue.pattern}"
......@@ -117,7 +91,7 @@
lang="{referenceLanguageSelection}"
class="tx-lfeditor-textarea" />
</f:else>
</f:if>
</lfe:extendedIf>
<f:if condition="{constValue.default}">
<p class="tx-lfeditor-defaultTranslation bgColor3">
{constValue.default}
......
Markdown is supported
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