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.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]);
}
});