Commit ffce6028 authored by Marc Egger's avatar Marc Egger
Browse files

AbstractBuildForm.php: Throw error if datalist and dynamic update both on

parent 6a6be209
Pipeline #1501 passed with stage
in 2 minutes and 3 seconds
......@@ -2446,6 +2446,9 @@ abstract class AbstractBuildForm {
$formElement = HelperFormElement::prepareExtraButton($formElement, false);
$attribute .= $this->getAttributeFeMode($formElement[FE_MODE]);
if (isset($formElement["datalist"])) {
if ($formElement[FE_DYNAMIC_UPDATE] === 'yes') {
throw new UserFormException("Datalist funktionert nicht mit dynamic update", ERROR_NOT_IMPLEMENTED);
}
$datalistId = $formElement[FE_HTML_ID] . '-datalist';
$html = '<input ' . Support::doAttribute('list', $datalistId) . $attribute . '><datalist '
. Support::doAttribute('id', $datalistId) . '>' . $option . '</datalist>';
......@@ -2453,7 +2456,6 @@ abstract class AbstractBuildForm {
$html = '<select ' . $attribute . '>' . $option . '</select>';
}
$html = $html . $this->getHelpBlock() . $formElement[FE_TMP_EXTRA_BUTTON_HTML];
return $html . $formElement[FE_INPUT_EXTRA_BUTTON_INFO];
}
......
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