Commit 81e5a8dc authored by Carsten  Rose's avatar Carsten Rose
Browse files

AbstractBuildForm.php: added 'help-box with-errors'-DIV after radios and checkboxes.

parent 2dcdf14b
......@@ -424,7 +424,7 @@ abstract class AbstractBuildForm {
$elementHtml = $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value, $jsonElement, $mode);
// container elements do not have dynamicUpdate='yes'. Instead they deliver nested elements.
if ($formElement['class'] == 'container') {
if ($formElement[FE_CLASS] == FE_CLASS_CONTAINER) {
if (count($jsonElement) > 0) {
$json = array_merge($json, $jsonElement);
}
......@@ -1010,7 +1010,7 @@ abstract class AbstractBuildForm {
throw new UserFormException('checkBoxMode: \'' . $formElement['checkBoxMode'] . '\' is unknown.', ERROR_CHECKBOXMODE_UNKNOWN);
}
return $html;
return $html . $this->getHelpBlock();
}
/**
......@@ -1072,11 +1072,8 @@ abstract class AbstractBuildForm {
$itemKey = $itemValue;
}
// Process 'emptyHide' before 'emptyItemAtStart' / 'emptyItemAtEnd': than 'emptyItem*' are still possible.
if (isset($formElement['emptyHide'])) {
// if (isset($itemValue['']))
// unset($itemValue['']);
// if (isset($itemKey['']))
// unset($itemKey['']);
$itemKey = OnArray::removeEmptyElementsFromArray($itemKey);
$itemValue = OnArray::removeEmptyElementsFromArray($itemValue);
}
......@@ -1525,10 +1522,12 @@ abstract class AbstractBuildForm {
$formElement[FE_BUTTON_CLASS] = 'btn-default';
}
return $this->constructRadioButton($formElement, $htmlFormElementId, $value, $json, $mode);
$html = $this->constructRadioButton($formElement, $htmlFormElementId, $value, $json, $mode);
} else {
return $this->constructRadioPlain($formElement, $htmlFormElementId, $value, $json, $mode);
$html = $this->constructRadioPlain($formElement, $htmlFormElementId, $value, $json, $mode);
}
return $html . $this->getHelpBlock();
}
/**
......
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