From 810e94a64719d1d2a421a04e16cf65127752c2c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 27 May 2022 15:58:35 +0200 Subject: [PATCH] fixup! privatewifi use template method --- .../lib/gluon/config-mode/model/admin/privatewifi.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua index 7fae1485..3e44c7e3 100644 --- a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua +++ b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua @@ -26,13 +26,12 @@ end local enabled = s:option(Flag, "enabled", translate("Enabled")) enabled.default = uci:get('wireless', primary_iface) and not uci:get_bool('wireless', primary_iface, "disabled") +local warning = s:template('model/warning') if mesh_on_wan and enabled.data then - local w = Warning() - w:setcontent(translate( + w.content = translate( 'Meshing on WAN interface is enabled.' .. 'This can lead to problems.' - )) - s:append(w) + ) end local ssid = s:option(Value, "ssid", translate("Name (SSID)"))