From 5c54090fff91ec1ee25840635a806041c058c5a6 Mon Sep 17 00:00:00 2001
From: Jo-Philipp Wich <jow@openwrt.org>
Date: Mon, 11 Oct 2010 23:23:02 +0000
Subject: themes/openwrt.org: display a warning if no root password is set

---
 themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css | 1 +
 themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm  | 7 +++++++
 2 files changed, 8 insertions(+)

(limited to 'themes/openwrt.org')

diff --git a/themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css b/themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
index 91771a78c3..c78c2543e5 100644
--- a/themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
+++ b/themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
@@ -834,6 +834,7 @@ div.cbi-tab-descr {
 	border: 1px solid #FF0000;
 	background-color: #FFCCCC;
 	padding: 5px;
+	margin-bottom: 5px;
 }
 
 #memorybar {
diff --git a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
index ccb01ec30f..0a32055f80 100644
--- a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
+++ b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
@@ -168,3 +168,10 @@ else -%>
 			<%: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 -%>
-- 
cgit v1.2.3