]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tpl/loginform.html
Fixes can login function call in loginform.html
[github/shaarli/Shaarli.git] / tpl / loginform.html
index f0b45df28be63fa23e365a570e4b1c9ad6c976ee..84176385765837973d77be29941db622ccad1f6a 100644 (file)
@@ -2,17 +2,26 @@
 <html>
 <head>{include="includes"}</head>
 <body
-{if="ban_canLogin()"} onload="document.loginform.login.focus();"{/if}>
+{if="ban_canLogin($conf)"}
+  {if="empty($username)"}
+    onload="document.loginform.login.focus();"
+  {else}
+    onload="document.loginform.password.focus();"
+  {/if}
+{/if}>
 <div id="pageheader">
   {include="page.header"}
 
   <div id="headerform">
-    {if="!ban_canLogin()"}
+    {if="!ban_canLogin($conf)"}
       You have been banned from login after too many failed attempts. Try later.
     {else}
       <form method="post" name="loginform">
-        <label for="login">Login: <input type="text" id="login" name="login" tabindex="1"></label>
-        <label for="password">Password: <input type="password" id="password" name="password" tabindex="2"></label>
+        <label for="login">Login: <input type="text" id="login" name="login" tabindex="1"
+           {if="!empty($username)"}value="{$username}"{/if}>
+        </label>
+        <label for="password">Password: <input type="password" id="password" name="password" tabindex="2">
+        </label>
         <input type="submit" value="Login" class="bigbutton" tabindex="4">
         <label for="longlastingsession">
           <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="3">