luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js
Florian Eckert bff0878f91 luci-mod-system: add led-trigger description
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-10-27 10:38:34 +02:00

22 lines
539 B
JavaScript

'use strict';
'require baseclass';
'require form';
return baseclass.extend({
trigger: _('Always on (kernel: default-on)'),
description: _('The LED is always in default state on.'),
kernel: true,
addFormOptions(s){
var o;
o = s.option(form.Flag, 'default', _('Default state'));
o.rmempty = false;
o.depends('trigger', 'default-on');
o.textvalue = function(section_id) {
var cval = this.cfgvalue(section_id);
if (cval == null)
cval = this.default;
return (cval == this.enabled) ? _('On') : _('Off');
};
}
});