Commit c0cfd318 authored by Carsten  Rose's avatar Carsten Rose

Formlet: fixed wrong htmlFormElementName

parent 5174b681
Pipeline #896 passed with stage
in 1 minute and 35 seconds
......@@ -1053,11 +1053,11 @@ abstract class AbstractBuildForm {
if ($formElement[FE_BS_INPUT_COLUMNS] > 0) {
$children[] = [
API_ELEMENTS_TYPE => 'checkbox',
API_ELEMENTS_NAME => $formElement[FE_NAME],
API_ELEMENTS_NAME => $htmlFormElementName, // $formElement[FE_NAME],
API_ELEMENTS_VALUE => $value,
API_ELEMENTS_TOOLTIP => $formElement[FE_TOOLTIP],
API_ELEMENTS_ON_CLICK => 'submit',
API_ELEMENTS_CHECKED => $formElement[FE_CHECKBOX_CHECKED] == $value ? 'true' : 'false',
API_ELEMENTS_CHECKED => $formElement[FE_CHECKBOX_CHECKED] == $value ? true : false,
API_ELEMENTS_WIDTH => $formElement[FE_BS_INPUT_COLUMNS],
];
}
......@@ -1815,7 +1815,6 @@ abstract class AbstractBuildForm {
*/
public function constructCheckboxSingleButton(array $formElement, $htmlFormElementName, $attribute, $value, array &$json) {
$html = '';
$valueJson = false;
$attribute .= Support::doAttribute('id', $formElement[FE_HTML_ID]);
$attribute .= Support::doAttribute('name', $htmlFormElementName);
......@@ -1827,7 +1826,6 @@ abstract class AbstractBuildForm {
$classActive = '';
if ($formElement[FE_CHECKBOX_CHECKED] === $value) {
$attribute .= Support::doAttribute('checked', 'checked');
$valueJson = true;
$classActive = ' active';
}
......@@ -1849,7 +1847,7 @@ abstract class AbstractBuildForm {
$htmlElement, true);
$html = Support::wrapTag('<div class="btn-group" data-toggle="buttons">', $html);
$json = $this->getJsonFormElement($htmlFormElementName, $valueJson, $formElement);
$json = $this->getJsonFormElement($htmlFormElementName, $value, $formElement);
return $html;
}
......@@ -1875,7 +1873,6 @@ abstract class AbstractBuildForm {
*/
public function constructCheckboxSinglePlain(array $formElement, $htmlFormElementName, $attribute, $value, array &$json) {
$html = '';
$valueJson = false;
$attribute .= Support::doAttribute('id', $formElement[FE_HTML_ID]);
$attribute .= Support::doAttribute('name', $htmlFormElementName);
......@@ -1885,8 +1882,6 @@ abstract class AbstractBuildForm {
if ($formElement[FE_CHECKBOX_CHECKED] === $value) {
$attribute .= Support::doAttribute('checked', 'checked');
// $valueJson = true;
$valueJson = $value;
}
$attribute .= $this->getAttributeList($formElement, ['autofocus']);
......@@ -1904,7 +1899,7 @@ abstract class AbstractBuildForm {
$html = Support::wrapTag("<label>", $html, true);
$html = Support::wrapTag("<div class='checkbox'>", $html, true);
$json = $this->getJsonFormElement($htmlFormElementName, $valueJson, $formElement);
$json = $this->getJsonFormElement($htmlFormElementName, $value, $formElement);
return $html;
}
......
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