luci-mod-system: leds.js: display default state as On/Off
Fixes: #3289 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
e8abe15483
commit
0731f7e5e4
1 changed files with 8 additions and 0 deletions
|
@ -53,6 +53,14 @@ return L.view.extend({
|
|||
|
||||
o = s.option(form.Flag, 'default', _('Default state'));
|
||||
o.rmempty = false;
|
||||
o.textvalue = function(section_id) {
|
||||
var cval = this.cfgvalue(section_id);
|
||||
|
||||
if (cval == null)
|
||||
cval = this.default;
|
||||
|
||||
return (cval == this.enabled) ? _('On') : _('Off');
|
||||
};
|
||||
|
||||
o = s.option(form.ListValue, 'trigger', _('Trigger'));
|
||||
if (usb.devices && usb.devices.length)
|
||||
|
|
Loading…
Reference in a new issue