Commit 5b884558 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #3464. Checkboxes now disabled (readonly), even when rendered as Bootstrap.

parent dba738d0
Pipeline #1231 passed with stage
in 1 minute and 27 seconds
......@@ -1756,6 +1756,10 @@ abstract class AbstractBuildForm {
$formElement[FE_BUTTON_CLASS] = 'btn-default';
}
if ($formElement[FE_MODE] == FE_MODE_READONLY) {
$formElement[FE_BUTTON_CLASS] .= ' disabled';
}
return $this->constructCheckboxSingleButton($formElement, $htmlFormElementName, $attribute, $value, $json);
} else {
return $this->constructCheckboxSinglePlain($formElement, $htmlFormElementName, $attribute, $value, $json);
......@@ -1901,6 +1905,10 @@ abstract class AbstractBuildForm {
$formElement[FE_BUTTON_CLASS] = 'btn-default';
}
if ($formElement[FE_MODE] == FE_MODE_READONLY) {
$formElement[FE_BUTTON_CLASS] .= ' disabled';
}
return $this->constructCheckboxMultiButton($formElement, $htmlFormElementName, $attributeBase, $value, $itemKey, $itemValue, $json);
} else {
return $this->constructCheckboxMultiPlain($formElement, $htmlFormElementName, $attributeBase, $value, $itemKey, $itemValue, $json);
......@@ -3069,7 +3077,9 @@ abstract class AbstractBuildForm {
Support::setIfNotSet($formElement, FE_FILE_BUTTON_TEXT, FE_FILE_BUTTON_TEXT_DEFAULT);
$htmlInputFile = Support::wrapTag("<label $attributeFileLabel>", $htmlInputFile . $formElement[FE_FILE_BUTTON_TEXT]);
$deleteButton = Support::wrapTag("<button type='button' class='btn btn-default delete-file' data-sip='$sipUpload' name='delete-$htmlFormElementName'>", $this->symbol[SYMBOL_DELETE]);
$disabled= ($formElement[FE_MODE]==FE_MODE_READONLY)?'disabled':'';
$deleteButton = Support::wrapTag("<button type='button' class='btn btn-default delete-file $disabled' $disabled data-sip='$sipUpload' name='delete-$htmlFormElementName'>", $this->symbol[SYMBOL_DELETE]);
if (Support::isEnabled($formElement, FE_FILE_DOWNLOAD_BUTTON)) {
if (is_readable($value)) {
......
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