Current experience is at the very least confusing, first there's a (otherwise useful) warning dialog, with a link that (unless you login beforehand) only rewrites the url but shows the same login page; where you're supposed to just push enter, but with no instructions whatsoever.
Get rid of this intermediate step, with a conditional javascript form.submit() Signed-off-by: nicoechaniz <nicoecha...@altermundi.net> Tested-by: Gui Iribarren <g...@altermundi.net> --- modules/admin-core/luasrc/view/sysauth.htm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/admin-core/luasrc/view/sysauth.htm b/modules/admin-core/luasrc/view/sysauth.htm index 7c39f0d..a3c7e69 100644 --- a/modules/admin-core/luasrc/view/sysauth.htm +++ b/modules/admin-core/luasrc/view/sysauth.htm @@ -13,7 +13,7 @@ You may obtain a copy of the License at <%+header%> -<form method="post" action="<%=pcdata(luci.http.getenv("REQUEST_URI"))%>"> +<form name="login" method="post" action="<%=pcdata(luci.http.getenv("REQUEST_URI"))%>"> <div class="cbi-map"> <h2><a id="content" name="content"><%:Authorization Required%></a></h2> <div class="cbi-map-descr"> @@ -50,6 +50,12 @@ You may obtain a copy of the License at input.focus(); //]]></script> +<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%> +<script type="text/javascript">//<![CDATA[ + document.login.submit() +//]]></script> +<%- end -%> + <% local uci = require "luci.model.uci".cursor() local fs = require "nixio.fs" -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel