luci-mod-network: fix src/dest textvalue for rules 5353/head
authorVladislav Grigoryev <vg.aetera@gmail.com>
Fri, 10 Sep 2021 10:47:28 +0000 (13:47 +0300)
committerVladislav Grigoryev <vg.aetera@gmail.com>
Fri, 10 Sep 2021 10:54:18 +0000 (13:54 +0300)
Fix the incorrectly displayed src/dest textvalue for the rules.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/routes.js

index 701f16c75f2035116144099ffdf6d58fa9797088..c20574dbffd58a0b406b7c024f910728be0800d9 100644 (file)
@@ -149,7 +149,7 @@ return view.extend({
                        o.datatype = (family == 6) ? 'cidr6' : 'cidr4';
                        o.placeholder = (family == 6) ? '::/0' : '0.0.0.0/0';
                        o.textvalue = function(section_id) {
-                               return E('em', _('any'));
+                               return this.cfgvalue(section_id) || E('em', _('any'));
                        };
 
                        o = s.taboption('general', widgets.NetworkSelect, 'out', _('Outgoing interface'));
@@ -160,7 +160,7 @@ return view.extend({
                        o.datatype = (family == 6) ? 'cidr6' : 'cidr4';
                        o.placeholder = (family == 6) ? '::/0' : '0.0.0.0/0';
                        o.textvalue = function(section_id) {
-                               return E('em', _('any'));
+                               return this.cfgvalue(section_id) || E('em', _('any'));
                        };
 
                        o = s.taboption('general', form.Value, 'lookup', _('Table'));