diff options
author | Arthur <arthur@hoa.ro> | 2016-05-14 11:09:39 +0200 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-05-14 11:09:39 +0200 |
commit | 52ccf0d7ee25eb0b6fc405aafcf7211ef07307e1 (patch) | |
tree | 404379a9cea49201b3950de88c6f731a24349bb0 /tpl | |
parent | 765391cb376500a8372aedd426dd4bfbe04ee8ec (diff) | |
parent | 85c4bdc23581b91971315c42508c2d8f7a5fa738 (diff) | |
download | Shaarli-52ccf0d7ee25eb0b6fc405aafcf7211ef07307e1.tar.gz Shaarli-52ccf0d7ee25eb0b6fc405aafcf7211ef07307e1.tar.zst Shaarli-52ccf0d7ee25eb0b6fc405aafcf7211ef07307e1.zip |
Merge pull request #556 from ArthurHoaro/login-refill
Prefill the login field when the authentication has failed
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/loginform.html | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/tpl/loginform.html b/tpl/loginform.html index 678375fd..a49b42d3 100644 --- a/tpl/loginform.html +++ b/tpl/loginform.html | |||
@@ -1,26 +1,36 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head>{include="includes"}</head> | 3 | <head>{include="includes"}</head> |
4 | <body{if="ban_canLogin()"} onload="document.loginform.login.focus();"{/if}> | 4 | <body |
5 | {if="ban_canLogin()"} | ||
6 | {if="empty($username)"} | ||
7 | onload="document.loginform.login.focus();" | ||
8 | {else} | ||
9 | onload="document.loginform.password.focus();" | ||
10 | {/if} | ||
11 | {/if}> | ||
5 | <div id="pageheader"> | 12 | <div id="pageheader"> |
6 | {include="page.header"} | 13 | {include="page.header"} |
7 | 14 | ||
8 | <div id="headerform"> | 15 | <div id="headerform"> |
9 | {if="!ban_canLogin()"} | 16 | {if="!ban_canLogin()"} |
10 | You have been banned from login after too many failed attempts. Try later. | 17 | You have been banned from login after too many failed attempts. Try later. |
11 | {else} | 18 | {else} |
12 | <form method="post" name="loginform"> | 19 | <form method="post" name="loginform"> |
13 | <label for="login">Login: <input type="text" id="login" name="login" tabindex="1"></label> | 20 | <label for="login">Login: <input type="text" id="login" name="login" tabindex="1" |
14 | <label for="password">Password: <input type="password" id="password" name="password" tabindex="2"></label> | 21 | {if="!empty($username)"}value="{$username}"{/if}> |
15 | <input type="submit" value="Login" class="bigbutton" tabindex="4"> | 22 | </label> |
16 | <label for="longlastingsession"> | 23 | <label for="password">Password: <input type="password" id="password" name="password" tabindex="2"> |
17 | <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="3"> | 24 | </label> |
18 | Stay signed in (Do not check on public computers)</label> | 25 | <input type="submit" value="Login" class="bigbutton" tabindex="4"> |
19 | <input type="hidden" name="token" value="{$token}"> | 26 | <label for="longlastingsession"> |
20 | {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if} | 27 | <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="3"> |
21 | </form> | 28 | Stay signed in (Do not check on public computers)</label> |
22 | {/if} | 29 | <input type="hidden" name="token" value="{$token}"> |
23 | </div> | 30 | {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if} |
31 | </form> | ||
32 | {/if} | ||
33 | </div> | ||
24 | </div> | 34 | </div> |
25 | 35 | ||
26 | {include="page.footer"} | 36 | {include="page.footer"} |