themes/openwrt.org: display a warning if no root password is set
[project/luci.git] / themes / openwrt.org / luasrc / view / themes / openwrt.org / header.htm
index 6e1853e..0a32055 100644 (file)
@@ -49,6 +49,7 @@ require("luci.http").prepare_content("application/xhtml+xml")
 <script type="text/javascript" src="<%=resource%>/VarType.js"></script>
 <script type="text/javascript" src="<%=resource%>/XHTML1.js"></script>
 <script type="text/javascript" src="<%=resource%>/Dropdowns.js"></script>
+<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
 <title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI</title>
 </head>
 <body class="lang_<%=luci.i18n.context.lang%>">
@@ -161,3 +162,16 @@ else -%>
 <div class="clear"></div>
 </div>
 <div id="maincontent">
+       <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>
+
+       <%- if not luci.sys.user.getpasswd("root") then -%>
+       <div class="errorbox">
+               <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 -%>