mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 21:24:35 +04:00
luci-mod-system: move default option from defaul-on trigger to none trigger
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -8,15 +8,5 @@ return baseclass.extend({
|
||||
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');
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,5 +7,15 @@ return baseclass.extend({
|
||||
kernel: true,
|
||||
addFormOptions(s){
|
||||
var o;
|
||||
|
||||
o = s.option(form.Flag, 'default', _('Default state'));
|
||||
o.rmempty = false;
|
||||
o.depends('trigger', 'none');
|
||||
o.textvalue = function(section_id) {
|
||||
var cval = this.cfgvalue(section_id);
|
||||
if (cval == null)
|
||||
cval = this.default;
|
||||
return (cval == this.enabled) ? _('On') : _('Off');
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user