summaryrefslogtreecommitdiff
path: root/web/share/js/tools.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/share/js/tools.js')
-rw-r--r--web/share/js/tools.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js
index 74565932..702783d6 100644
--- a/web/share/js/tools.js
+++ b/web/share/js/tools.js
@@ -141,6 +141,12 @@ export var tools = new function() {
el.value = value;
};
+ this.radioMakeItem = function(name, title, value) {
+ return `
+ <input type="radio" id="${name}-${value}" name="${name}" value="${value}" />
+ <label for="${name}-${value}">${title}</label>
+ `;
+ };
this.radioSetOnClick = function(name, callback) {
for (let el of $$$(`input[type="radio"][name="${name}"]`)) {
this.setOnClick(el, callback);