modules/freifunk: Fix error on freifunk/adminindex page when running on the Development Environment
This commit is contained in:
parent
0ef557b15c
commit
16c26a5154
1 changed files with 10 additions and 1 deletions
|
@ -8,6 +8,15 @@ local latitude = uci:get_first ("system", "system", "latitude")
|
||||||
local longitude = uci:get_first ("system", "system", "longitude")
|
local longitude = uci:get_first ("system", "system", "longitude")
|
||||||
local location = uci:get_first ("system", "system", "location")
|
local location = uci:get_first ("system", "system", "location")
|
||||||
local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "basics")
|
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
|
||||||
|
|
||||||
luci.i18n.loadc("freifunk")
|
luci.i18n.loadc("freifunk")
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
@ -23,7 +32,7 @@ luci.i18n.loadc("freifunk")
|
||||||
<%end%>
|
<%end%>
|
||||||
<p />
|
<p />
|
||||||
|
|
||||||
<% if not (contact.nickname and contact.name and contact.mail) then%>
|
<% if not (nickname and name and mail) then%>
|
||||||
<div class="error">
|
<div class="error">
|
||||||
<%:Contact information is incomplete. Please go to%> <a href='<%=contacturl%>'><%:Contact%></a> <%:and fill out all required fields.%>
|
<%:Contact information is incomplete. Please go to%> <a href='<%=contacturl%>'><%:Contact%></a> <%:and fill out all required fields.%>
|
||||||
<p />
|
<p />
|
||||||
|
|
Loading…
Reference in a new issue