From 7a677b1fdefb120c2628aec310f0508f411be9e8 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 28 Oct 2021 15:43:50 +0200 Subject: [PATCH] luci-mod-system: move default option from defaul-on trigger to none trigger Signed-off-by: Florian Eckert (cherry picked from commit 5b42cd5b46c32bf168b7156602bfa0ba841904a1) --- .../resources/view/system/led-trigger/default-on.js | 10 ---------- .../resources/view/system/led-trigger/none.js | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) 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 ba7b00ede3..b9713cef1c 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 @@ -7,15 +7,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 ef21adc7dc..8542a6cda7 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 @@ -6,5 +6,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'); + }; } });