gluon-web-model: fix Warning field not being hidden
"not self.title" doesn't work because of "self.title = title or """
This commit is contained in:
parent
1f451d4021
commit
ad8cfe02c2
@ -1,14 +1,14 @@
|
|||||||
<%- if self.title or self.content then -%>
|
<%- if not self.hide then -%>
|
||||||
<div class="gluon-warning"<%=
|
<div class="gluon-warning"<%=
|
||||||
attr("id", id) ..
|
attr("id", id) ..
|
||||||
attr("data-index", self.index) ..
|
attr("data-index", self.index) ..
|
||||||
attr("data-depends", self:deplist(self.deps))
|
attr("data-depends", self:deplist(self.deps))
|
||||||
%>>
|
%>>
|
||||||
<%- if self.content then -%>
|
<%- if self.content then -%>
|
||||||
<%=self.content%>
|
<%= self.content %>
|
||||||
<%- else -%>
|
<%- else -%>
|
||||||
<b><%=self.title%></b><br>
|
<b><%= self.title %></b><br>
|
||||||
<%=self.description%>
|
<%= self.description %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</div>
|
</div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
@ -27,10 +27,11 @@ local enabled = s:option(Flag, "enabled", translate("Enabled"))
|
|||||||
enabled.default = uci:get('wireless', primary_iface) and not uci:get_bool('wireless', primary_iface, "disabled")
|
enabled.default = uci:get('wireless', primary_iface) and not uci:get_bool('wireless', primary_iface, "disabled")
|
||||||
|
|
||||||
local warning = s:element('model/warning', {
|
local warning = s:element('model/warning', {
|
||||||
content = mesh_on_wan and translate(
|
content = translate(
|
||||||
'Meshing on WAN interface is enabled. ' ..
|
'Meshing on WAN interface is enabled. ' ..
|
||||||
'This can lead to problems.'
|
'This can lead to problems.'
|
||||||
) or nil,
|
),
|
||||||
|
hide = not mesh_on_wan,
|
||||||
}, 'warning')
|
}, 'warning')
|
||||||
warning:depends(enabled, true)
|
warning:depends(enabled, true)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user