From 47477ff15bd9e3d1ac9966f5f6c217d69b255472 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Fri, 24 Nov 2023 14:54:21 +0100 Subject: [PATCH] fix class output in buttons --- public_html/deployment/classes/formgen.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public_html/deployment/classes/formgen.class.php b/public_html/deployment/classes/formgen.class.php index a4e725b8..33dc0ce6 100644 --- a/public_html/deployment/classes/formgen.class.php +++ b/public_html/deployment/classes/formgen.class.php @@ -150,7 +150,8 @@ class formgen { switch ($elementData["type"]) { case "button": $this->_checkReqiredKeys($elementData, array("value")); - $sFormElement.=' <button id="' . $sId . '" class="btn btn-default"'; + $elementData["class"]=$elementData["class"] ? $elementData["class"] : "btn btn-default"; + $sFormElement.=' <button id="' . $sId . '" '; $sFormElement.=$this->_addHtmlAtrributes(explode(",", "$sDefaultAttributes,checked,name"), $elementData); $sFormElement.='>' . $elementData["value"] . '</button>'; $sFormElement.="\n"; -- GitLab