treewide: avoid double-escaping CBI section labels
[project/luci.git] / modules / luci-mod-freifunk / luasrc / view / freifunk / adminindex.htm
1 <%+header%>
2 <%
3 local uci = require "luci.model.uci".cursor()
4 local nickname = uci:get("freifunk", "contact", "nickname") or ""
5 local name = uci:get("freifunk", "contact", "name") or ""
6 local mail = uci:get("freifunk", "contact", "mail") or ""
7 local contacturl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "contact")
8 local hostname = uci:get_first ("system", "system", "hostname")
9 local latitude = uci:get_first ("system", "system", "latitude")
10 local longitude = uci:get_first ("system", "system", "longitude")
11 local location = uci:get_first ("system", "system", "location")
12 local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "basics")
13 %>
14
15 <h2><%:Freifunk Overview%></h2>
16
17 <%:These pages will assist you in setting up your router for Freifunk or similar wireless community networks.%>
18 <p />
19
20 <% if not (hostname and latitude and longitude and location) then%>
21 <div class="error">
22 <%:Basic settings are incomplete. Please go to%> <a href='<%=basicsurl%>'><%:Basic settings%></a> <%:and fill out all required fields.%>
23 </div>
24 <%end%>
25 <p />
26
27 <% if not (nickname and name and mail) then%>
28 <div class="error">
29 <%:Contact information is incomplete. Please go to%> <a href='<%=contacturl%>'><%:Contact%></a> <%:and fill out all required fields.%>
30 <p />
31 </div>
32 <%end%>
33
34 <% uci:foreach("wireless", "wifi-device", function(section)
35 local device = section[".name"]
36 local url = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "network", "wireless")
37 if section.diversity ~= "0" and section.disabled ~= "1" and section.type ~= "mac80211" then
38 print('<div class="error">' .. translate("Diversity is enabled for device") .. ' <b>' .. section[".name"] .. '</b>. '
39 .. translate("Go to") .. ' <a href="' .. url .. '">' .. translate("wireless settings") .. '</a> ' ..
40 translate("to disable it.") .. '</div><p />')
41 end
42 end) %>
43
44 <%+footer%>