modules/base: attempt to work around Firefox autocomplete bugs
Ref: https://dev.openwrt.org/ticket/18176 Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
b83bbed919
commit
ff65318ba5
2 changed files with 5 additions and 5 deletions
|
@ -145,8 +145,8 @@ function error500(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
function authenticator.htmlauth(validator, accs, default)
|
function authenticator.htmlauth(validator, accs, default)
|
||||||
local user = luci.http.formvalue("username")
|
local user = luci.http.formvalue("luci_username")
|
||||||
local pass = luci.http.formvalue("password")
|
local pass = luci.http.formvalue("luci_password")
|
||||||
|
|
||||||
if user and validator(user, pass) then
|
if user and validator(user, pass) then
|
||||||
return user
|
return user
|
||||||
|
|
|
@ -27,13 +27,13 @@ You may obtain a copy of the License at
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Username%></label>
|
<label class="cbi-value-title"><%:Username%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input class="cbi-input-user" type="text" name="username" value="<%=duser%>" />
|
<input class="cbi-input-user" type="text" name="luci_username" value="<%=duser%>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cbi-value cbi-value-last">
|
<div class="cbi-value cbi-value-last">
|
||||||
<label class="cbi-value-title"><%:Password%></label>
|
<label class="cbi-value-title"><%:Password%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input id="focus_password" class="cbi-input-password" type="password" name="password" />
|
<input class="cbi-input-password" type="password" name="luci_password" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset></fieldset>
|
</fieldset></fieldset>
|
||||||
|
@ -45,7 +45,7 @@ You may obtain a copy of the License at
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
var input = document.getElementById('focus_password');
|
var input = document.getElementsByName('luci_password')[0];
|
||||||
if (input)
|
if (input)
|
||||||
input.focus();
|
input.focus();
|
||||||
//]]></script>
|
//]]></script>
|
||||||
|
|
Loading…
Reference in a new issue