luci-mod-network: properly reflect config state in sysfs tristates
When a boolean sysfs option is forcibly set to `0` or `1` in uci, then make sure to properly reflect that choice state when rendering the widget. Right now the dropdown incorrectly reverted to "automatic" after saving but not applying the changes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
6bdc577109
commit
4b6b00927b
1 changed files with 1 additions and 1 deletions
|
@ -198,7 +198,7 @@ var cbiFlagTristate = form.ListValue.extend({
|
|||
this.vallist[0] = sysdef ? _('automatic (enabled)') : _('automatic (disabled)');
|
||||
}
|
||||
|
||||
return this.super('renderWidget', [section_id, option_index, cfgvalue]);
|
||||
return this.super('renderWidget', [section_id, option_index, cfgvalue ? cfgvalue + '!' : null]);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue