mirror of
https://github.com/openwrt/luci.git
synced 2025-12-26 15:36:22 +04:00
In the underlying uci system, all variables are effectively strings, so
for those configuration values which serve as 'boolean' flags, we need
to coerce the various forms into a real boolean. Only the following
string values result in true: 1|on|true|yes|enabled. Otherwise, false.
Checkboxes now fill correctly.
"Unchanged" configurations may write changed values as the Flag values
are coerced to '1' or '0' on write, but the configuration behaviour
remains synonymous.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 1355a6fa25)