summaryrefslogtreecommitdiff
path: root/js/App.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-18 11:54:22 +0300
committerAndrew Dolgov <[email protected]>2021-02-18 11:54:22 +0300
commit1adb9bb6b643736706b746629b849df9cdf45e50 (patch)
tree4361f08284d0667a075df004e3c76b2aade51e06 /js/App.js
parentb16abc157ee584f4be80a537ee24ec9e5ff25496 (diff)
profiles: use client dialog; move related methods to pref-prefs
Diffstat (limited to 'js/App.js')
-rw-r--r--js/App.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/App.js b/js/App.js
index 9d8f6c275..ccfeb9024 100644
--- a/js/App.js
+++ b/js/App.js
@@ -42,6 +42,12 @@ const App = {
cancel_dialog_tag: function(value, attributes = {}) {
return this.button_tag(value, "", {...{onclick: "App.dialogOf(this).hide()"}, ...attributes});
},
+ checkbox_tag: function(name, checked = false, value = "", attributes = {}, id = "") {
+ return `<input dojoType="dijit.form.CheckBox" type="checkbox" name="${App.escapeHtml(name)}"
+ ${checked ? "checked" : ""}
+ ${value ? `value="${App.escapeHtml(value)}"` : ""}
+ ${this.attributes_to_string(attributes)} id="${App.escapeHtml(id)}">`
+ },
select_tag: function(name, value, values = [], attributes = {}, id = "") {
return `
<select name="${name}" dojoType="fox.form.Select" id="${App.escapeHtml(id)}" ${this.attributes_to_string(attributes)}>