From: Florian Eckert Date: Thu, 28 Oct 2021 13:43:50 +0000 (+0200) Subject: luci-mod-system: move default option from defaul-on trigger to none trigger X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=5b42cd5b46c32bf168b7156602bfa0ba841904a1;p=project%2Fluci.git luci-mod-system: move default option from defaul-on trigger to none trigger Signed-off-by: Florian Eckert --- diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js index 77d62b6a79..2de2743e4c 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js @@ -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'); - }; } }); diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js index 5b3b26344e..4b96cf087a 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js @@ -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'); + }; } });