themes/freifunk-generic: show warning when no root password is set
[project/luci.git] / themes / freifunk-generic / luasrc / view / themes / freifunk-generic / header.htm
index a6d82d9..035ca16 100644 (file)
@@ -74,6 +74,12 @@ require("luci.http").prepare_content("application/xhtml+xml")
 </div></div>
 <![endif]-->
 
+<%- if luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
+       <div class="warning">
+               <strong><%:No password set!%></strong><br />
+               <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>
+       </div>
+<%- end -%>
 
 <p class="skiplink">
 <span id="skiplink1"><a href="#navigation"><%:skiplink1 Skip to navigation%></a></span>
@@ -185,10 +191,11 @@ if tree.nodes[category] and tree.nodes[category].ucidata then
 <div class="clear"></div>
 </div>
 <div id="maincontent">
+<% if category ~= "freifunk" and category ~= "splash" then %>
 <noscript>
        <div class="errorbox">
                <strong><%:Java Script required!%></strong><br />
                <%:You must enable Java Script in your browser or LuCI will not work properly.%>
        </div>
 </noscript>
-
+<% end %>