diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-03-24 21:57:21 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-03-24 22:14:18 +0100 |
commit | 82fb5a67d39d965595d2ad833dbf930e559c0202 (patch) | |
tree | 58545ae200e3c16614efe8233baeecd5683d0a42 /modules/luci-base/htdocs/luci-static/resources/ui.js | |
parent | 573fdc045264c904f36a390e68510b557e4def87 (diff) |
luci-base: form.js / ui.js: tie form labels to widgets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 22ba6fc40933bee02c3ea93bbda952bb44bf3af1)
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/ui.js')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/ui.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index b78a109bf9..0e196df4b0 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -236,7 +236,8 @@ var UICheckbox = UIElement.extend({ 'name': this.options.name, 'type': 'checkbox', 'value': this.options.value_enabled, - 'checked': (this.value == this.options.value_enabled) ? '' : null + 'checked': (this.value == this.options.value_enabled) ? '' : null, + 'data-widget-id': this.options.id ? 'widget.' + this.options.id : null })); frameEl.appendChild(E('label', { 'for': id })); |