Form/Formfield : Add Bulma1 support
This commit is contained in:
+7
-3
@@ -172,7 +172,7 @@ class Form
|
||||
|
||||
/**
|
||||
* Set the Form Templating to use.
|
||||
* Can be : Bootstrap3, Bootstrap4 (later Bulma)
|
||||
* Can be : Bootstrap3, Bootstrap4 Bulma1
|
||||
* @param string $formTemplate The template to use
|
||||
*/
|
||||
public function formTemplate($formTemplate): self
|
||||
@@ -180,7 +180,7 @@ class Form
|
||||
if (
|
||||
! in_array(
|
||||
$formTemplate,
|
||||
["Bootstrap3", "Bootstrap4"],
|
||||
["Bootstrap3", "Bootstrap4", "Bulma1"],
|
||||
true
|
||||
)
|
||||
) {
|
||||
@@ -354,7 +354,10 @@ class Form
|
||||
if ($this->formName != "") {
|
||||
$res .= " id='$this->formName'";
|
||||
}
|
||||
$res .= " class='" . $this->formClass . "'>\n";
|
||||
if ($this->formTemplate !== "Bulma1") {
|
||||
$res .= " class='" . $this->formClass . "'";
|
||||
}
|
||||
$res .= ">\n";
|
||||
$group = "";
|
||||
if (isset($_SESSION["domframework"]["form"][$this->formName]["values"])) {
|
||||
$values = $_SESSION["domframework"]["form"][$this->formName]["values"];
|
||||
@@ -364,6 +367,7 @@ class Form
|
||||
}
|
||||
foreach ($this->fields as $field) {
|
||||
$field->formName = $this->formName;
|
||||
$field->formClass = $this->formClass;
|
||||
if (
|
||||
isset($field->group) && $field->group !== $group && $group !== "" ||
|
||||
!isset($field->group) && $group !== ""
|
||||
|
||||
+994
-1
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user