Commit dba738d0 authored by Carsten  Rose's avatar Carsten Rose
Browse files

refs #3464. Fixes missing readonly for Template Groups.

parent b97e3ecb
Pipeline #1229 passed with stage
in 1 minute and 37 seconds
...@@ -3697,7 +3697,7 @@ abstract class AbstractBuildForm { ...@@ -3697,7 +3697,7 @@ abstract class AbstractBuildForm {
private function fillFeSpecNativeCheckboxWithTgMax(array $formElementArr, $tgMaxCopies) { private function fillFeSpecNativeCheckboxWithTgMax(array $formElementArr, $tgMaxCopies) {
foreach ($formElementArr as $key => $formElement) { foreach ($formElementArr as $key => $formElement) {
if ($formElement[FE_TYPE] = FE_TYPE_CHECKBOX) { if ($formElement[FE_TYPE] == FE_TYPE_CHECKBOX) {
$formElementArr[$key][NAME_TG_COPIES] = $tgMaxCopies; $formElementArr[$key][NAME_TG_COPIES] = $tgMaxCopies;
} }
} }
...@@ -3735,6 +3735,8 @@ abstract class AbstractBuildForm { ...@@ -3735,6 +3735,8 @@ abstract class AbstractBuildForm {
$removeText = Support::setIfNotSet($formElement, FE_TEMPLATE_GROUP_REMOVE_TEXT, 'Remove'); $removeText = Support::setIfNotSet($formElement, FE_TEMPLATE_GROUP_REMOVE_TEXT, 'Remove');
$classCustom = Support::setIfNotSet($formElement, FE_TEMPLATE_GROUP_CLASS); $classCustom = Support::setIfNotSet($formElement, FE_TEMPLATE_GROUP_CLASS);
$disabled = ($formElement[FE_MODE] == FE_MODE_READONLY) ? "disabled='disabled'" : '';
// save parent processed FE's // save parent processed FE's
$feSpecNativeSave = $this->feSpecNative; $feSpecNativeSave = $this->feSpecNative;
...@@ -3758,12 +3760,12 @@ abstract class AbstractBuildForm { ...@@ -3758,12 +3760,12 @@ abstract class AbstractBuildForm {
EOT; EOT;
$htmlAdd = <<<EOT $htmlAdd = <<<EOT
<button type="button" id="$addButtonId" class="$addClass" onclick="QfqNS.addFields('#$templateName', '#$targetName', $max)">$addText</button> <button type="button" id="$addButtonId" class="$addClass" $disabled onclick="QfqNS.addFields('#$templateName', '#$targetName', $max)">$addText</button>
EOT; EOT;
$htmlDelete = <<<EOT $htmlDelete = <<<EOT
<div class="qfq-note-no-padding"> <div class="qfq-note-no-padding">
<button type="button" class="$removeClass" onclick="QfqNS.removeFields(this)">$removeText</button> <button type="button" class="$removeClass" $disabled onclick="QfqNS.removeFields(this)">$removeText</button>
</div> </div>
EOT; EOT;
......
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