diff --git a/app/model/BulmaForm.php b/app/model/BulmaForm.php new file mode 100644 index 0000000..1f72e98 --- /dev/null +++ b/app/model/BulmaForm.php @@ -0,0 +1,83 @@ + +
+ +
+
+
+
+ +
+
+
+ + '; + + $string = str_replace('%label%', $label, $string); + $string = str_replace('%name%', $name, $string); + $string = str_replace('%value%', $value, $string); + + return $string; + } + + public static function horizontal_field_textarea($label = "%label%", $name = "%name%", $value=""){ + $string = ' +
+
+ +
+
+
+
+ +
+
+
+
+ '; + + $string = str_replace('%label%', $label, $string); + $string = str_replace('%name%', $name, $string); + $string = str_replace('%value%', $value, $string); + + return $string; + } + + public static function horizontal_field_select($label="%label%", $name="%name%", $options=[], $selected=0){ + $string = ' +
+
+ +
+
+
+
+ +
+
+
+
+ '; + + $string = str_replace('%label%', $label, $string); + $string = str_replace('%name%', $name, $string); + $opts_str = ''; $i=0; + foreach($options as $v){ + $opts_str .= ''.$v.''; + $i++; + } + $string = str_replace('%options%', $opts_str, $string); + + return $string; + } + +} \ No newline at end of file