1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 12:25:56 +00:00

profiles: use client dialog; move related methods to pref-prefs

This commit is contained in:
Andrew Dolgov
2021-02-18 11:54:22 +03:00
parent b16abc157e
commit 1adb9bb6b6
4 changed files with 144 additions and 164 deletions

View File

@@ -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)}>