diff options
author | Andrew Dolgov <[email protected]> | 2021-02-18 13:16:55 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-18 13:16:55 +0300 |
commit | a2c75257f191d218dae6de8e5e4ad240a0588654 (patch) | |
tree | b29088f2aa36b5f967da946566ac4e3eca152950 /include/controls.php | |
parent | 75435aa960997fb4aa7a13c1a084ab3c53111e73 (diff) |
bookmarklets: cleanup
Diffstat (limited to 'include/controls.php')
-rwxr-xr-x | include/controls.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/controls.php b/include/controls.php index d8506877b..a60b1e0b0 100755 --- a/include/controls.php +++ b/include/controls.php @@ -23,7 +23,7 @@ } function button_tag(string $value, string $type, array $attributes = []) { - return "<button dojoType=\"dijit.form.Button\" ".attributes_to_string($attributes)." type=\"$type\">".htmlspecialchars($value)."</button>"; + return "<button dojoType=\"dijit.form.Button\" ".attributes_to_string($attributes)." type=\"$type\">$value</button>"; } function submit_tag(string $value, array $attributes = []) { @@ -34,6 +34,10 @@ return button_tag($value, "", array_merge(["onclick" => "App.dialogOf(this).hide()"], $attributes)); } + function icon(string $icon, array $attributes = []) { + return "<i class=\"material-icons\" ".attributes_to_string($attributes).">$icon</i>"; + } + function select_tag(string $name, $value, array $values, array $attributes = [], string $id = "") { $attributes_str = attributes_to_string($attributes); $dojo_type = strpos($attributes_str, "dojoType") === false ? "dojoType='fox.form.Select'" : ""; |