luci-0.11: merge outstanding trunk changes
[project/luci.git] / modules / freifunk / luasrc / view / freifunk / adminindex.htm
index 2b72370c22771e0258cdbd88da872bab419e31a2..e0252ba8919cfc5ca234d9d9eaa7a6aa8f25c39e 100644 (file)
@@ -8,6 +8,15 @@ local latitude = uci:get_first ("system", "system", "latitude")
 local longitude = uci:get_first ("system", "system", "longitude")
 local location = uci:get_first ("system", "system", "location")
 local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "basics")
+local nickname, name, mail
+if not contact then
+       nickname, name, mail = ""
+else
+       nickname = contact.nickname
+       name = contact.name
+       mail = contact.mail
+end
+
 %>
 
 <h2><%:Freifunk Overview%></h2>
@@ -22,7 +31,7 @@ local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "fr
 <%end%>
 <p />
 
-<% if not (contact.nickname and contact.name and contact.mail) then%>
+<% if not (nickname and name and mail) then%>
 <div class="error">
        <%:Contact information is incomplete. Please go to%> <a href='<%=contacturl%>'><%:Contact%></a> <%:and fill out all required fields.%>
        <p />
@@ -32,10 +41,10 @@ local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "fr
 <% uci:foreach("wireless", "wifi-device", function(section)
        local device = section[".name"]
        local url = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "network", "wireless")
-       if section.diversity ~= "0" and section.disabled ~= "1" then
-               print('<div class="error">' .. translate("Diversity is enabled for device") .. ' <b>' .. device .. '</b>. '
+       if section.diversity ~= "0" and section.disabled ~= "1" and section.type ~= "mac80211" then
+               print('<div class="error">' .. translate("Diversity is enabled for device") .. ' <b>' .. section[".name"] .. '</b>. '
                .. translate("Go to") .. ' <a href="' .. url .. '">' .. translate("wireless settings") .. '</a> ' ..
-               translate(" to disable it.") .. '</div><p />')
+               translate("to disable it.") .. '</div><p />')
        end
 end) %>