summaryrefslogtreecommitdiff
path: root/include/controls.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-16 14:42:27 +0300
committerAndrew Dolgov <[email protected]>2021-02-16 14:42:27 +0300
commitd7127cead362ba00b0defd93b2091ce15aeae2f3 (patch)
tree63c0c9f5f092e3f5161a26cee4775a0584321f7c /include/controls.php
parent1f43d7916cda16e9680b9087bda1f52934e8f25b (diff)
feed debugger: use hidden helpers; add button helpers
Diffstat (limited to 'include/controls.php')
-rwxr-xr-xinclude/controls.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/controls.php b/include/controls.php
index 34a4af1f2..78f02233f 100755
--- a/include/controls.php
+++ b/include/controls.php
@@ -1,6 +1,14 @@
<?php
namespace Controls;
+ function button_tag(string $value, string $type, $attributes = "") {
+ return "<button dojoType=\"dijit.form.Button\" $attributes type=\"$type\">".htmlspecialchars($value)."</button>";
+ }
+
+ function submit_tag(string $value, $attributes = "") {
+ return button_tag($value, "submit", "class=\"alt-primary\" $attributes");
+ }
+
function select_tag(string $name, $value, array $values, string $attributes = "", string $id = "") {
$dojo_type = strpos($attributes, "dojoType") === false ? "dojoType='fox.form.Select'" : "";