luci-mod-system: move default option from defaul-on trigger to none trigger
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 28 Oct 2021 13:43:50 +0000 (15:43 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 28 Oct 2021 13:49:39 +0000 (15:49 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 5b42cd5b46c32bf168b7156602bfa0ba841904a1)

modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js
modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js

index ba7b00ede319f40d1d8b43bd5da3eba6d010a603..b9713cef1cff80c2b6605da4d33f5f2a2305c782 100644 (file)
@@ -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');
-               };
        }
 });
index ef21adc7dcb302421706771748c57c776ee883c2..8542a6cda765a4013efb3137ec007dd8a76a4975 100644 (file)
@@ -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');
+               };
        }
 });