Fossil SCM
Set the 'autofocus' attribute for default input fields on the login, logout and register HTML forms. See [forum:4add4de05f | Forum post 4add4de05f] for more information.
Commit
bc05e6cc2798049956465dd02f1046ab867f13709340c693b35ad358539c73d5
Parent
d663a324515d19f…
1 file changed
+3
-3
+3
-3
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -751,11 +751,11 @@ | ||
| 751 | 751 | if( anonFlag ){ |
| 752 | 752 | @ <input type="hidden" name="anon" value="1"> |
| 753 | 753 | } |
| 754 | 754 | if( g.zLogin ){ |
| 755 | 755 | @ <p>Currently logged in as <b>%h(g.zLogin)</b>. |
| 756 | - @ <input type="submit" name="out" value="Logout"></p> | |
| 756 | + @ <input type="submit" name="out" value="Logout" autofocus></p> | |
| 757 | 757 | @ </form> |
| 758 | 758 | }else{ |
| 759 | 759 | unsigned int uSeed = captcha_seed(); |
| 760 | 760 | if( g.zLogin==0 && (anonFlag || zGoto==0) ){ |
| 761 | 761 | zAnonPw = db_text(0, "SELECT pw FROM user" |
| @@ -777,11 +777,11 @@ | ||
| 777 | 777 | @ </span></td></tr> |
| 778 | 778 | } |
| 779 | 779 | @ <tr> |
| 780 | 780 | @ <td class="form_label" id="userlabel1">User ID:</td> |
| 781 | 781 | @ <td><input type="text" id="u" aria-labelledby="userlabel1" name="u" \ |
| 782 | - @ size="30" value="%s(anonFlag?"anonymous":"")"></td> | |
| 782 | + @ size="30" value="%s(anonFlag?"anonymous":"")" autofocus></td> | |
| 783 | 783 | @ </tr> |
| 784 | 784 | @ <tr> |
| 785 | 785 | @ <td class="form_label" id="pswdlabel">Password:</td> |
| 786 | 786 | @ <td><input aria-labelledby="pswdlabel" type="password" id="p" \ |
| 787 | 787 | @ name="p" value="" size="30">\ |
| @@ -2243,11 +2243,11 @@ | ||
| 2243 | 2243 | @ <p><input type="hidden" name="captchaseed" value="%u(uSeed)"> |
| 2244 | 2244 | @ <table class="login_out"> |
| 2245 | 2245 | @ <tr> |
| 2246 | 2246 | @ <td class="form_label" align="right" id="uid">User ID:</td> |
| 2247 | 2247 | @ <td><input aria-labelledby="uid" type="text" name="u" \ |
| 2248 | - @ value="%h(zUserID)" size="30"></td> | |
| 2248 | + @ value="%h(zUserID)" size="30" autofocus></td> | |
| 2249 | 2249 | @ |
| 2250 | 2250 | if( iErrLine==1 ){ |
| 2251 | 2251 | @ <tr><td><td><span class='loginError'>↑ %h(zErr)</span></td></tr> |
| 2252 | 2252 | } |
| 2253 | 2253 | @ <tr> |
| 2254 | 2254 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -751,11 +751,11 @@ | |
| 751 | if( anonFlag ){ |
| 752 | @ <input type="hidden" name="anon" value="1"> |
| 753 | } |
| 754 | if( g.zLogin ){ |
| 755 | @ <p>Currently logged in as <b>%h(g.zLogin)</b>. |
| 756 | @ <input type="submit" name="out" value="Logout"></p> |
| 757 | @ </form> |
| 758 | }else{ |
| 759 | unsigned int uSeed = captcha_seed(); |
| 760 | if( g.zLogin==0 && (anonFlag || zGoto==0) ){ |
| 761 | zAnonPw = db_text(0, "SELECT pw FROM user" |
| @@ -777,11 +777,11 @@ | |
| 777 | @ </span></td></tr> |
| 778 | } |
| 779 | @ <tr> |
| 780 | @ <td class="form_label" id="userlabel1">User ID:</td> |
| 781 | @ <td><input type="text" id="u" aria-labelledby="userlabel1" name="u" \ |
| 782 | @ size="30" value="%s(anonFlag?"anonymous":"")"></td> |
| 783 | @ </tr> |
| 784 | @ <tr> |
| 785 | @ <td class="form_label" id="pswdlabel">Password:</td> |
| 786 | @ <td><input aria-labelledby="pswdlabel" type="password" id="p" \ |
| 787 | @ name="p" value="" size="30">\ |
| @@ -2243,11 +2243,11 @@ | |
| 2243 | @ <p><input type="hidden" name="captchaseed" value="%u(uSeed)"> |
| 2244 | @ <table class="login_out"> |
| 2245 | @ <tr> |
| 2246 | @ <td class="form_label" align="right" id="uid">User ID:</td> |
| 2247 | @ <td><input aria-labelledby="uid" type="text" name="u" \ |
| 2248 | @ value="%h(zUserID)" size="30"></td> |
| 2249 | @ |
| 2250 | if( iErrLine==1 ){ |
| 2251 | @ <tr><td><td><span class='loginError'>↑ %h(zErr)</span></td></tr> |
| 2252 | } |
| 2253 | @ <tr> |
| 2254 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -751,11 +751,11 @@ | |
| 751 | if( anonFlag ){ |
| 752 | @ <input type="hidden" name="anon" value="1"> |
| 753 | } |
| 754 | if( g.zLogin ){ |
| 755 | @ <p>Currently logged in as <b>%h(g.zLogin)</b>. |
| 756 | @ <input type="submit" name="out" value="Logout" autofocus></p> |
| 757 | @ </form> |
| 758 | }else{ |
| 759 | unsigned int uSeed = captcha_seed(); |
| 760 | if( g.zLogin==0 && (anonFlag || zGoto==0) ){ |
| 761 | zAnonPw = db_text(0, "SELECT pw FROM user" |
| @@ -777,11 +777,11 @@ | |
| 777 | @ </span></td></tr> |
| 778 | } |
| 779 | @ <tr> |
| 780 | @ <td class="form_label" id="userlabel1">User ID:</td> |
| 781 | @ <td><input type="text" id="u" aria-labelledby="userlabel1" name="u" \ |
| 782 | @ size="30" value="%s(anonFlag?"anonymous":"")" autofocus></td> |
| 783 | @ </tr> |
| 784 | @ <tr> |
| 785 | @ <td class="form_label" id="pswdlabel">Password:</td> |
| 786 | @ <td><input aria-labelledby="pswdlabel" type="password" id="p" \ |
| 787 | @ name="p" value="" size="30">\ |
| @@ -2243,11 +2243,11 @@ | |
| 2243 | @ <p><input type="hidden" name="captchaseed" value="%u(uSeed)"> |
| 2244 | @ <table class="login_out"> |
| 2245 | @ <tr> |
| 2246 | @ <td class="form_label" align="right" id="uid">User ID:</td> |
| 2247 | @ <td><input aria-labelledby="uid" type="text" name="u" \ |
| 2248 | @ value="%h(zUserID)" size="30" autofocus></td> |
| 2249 | @ |
| 2250 | if( iErrLine==1 ){ |
| 2251 | @ <tr><td><td><span class='loginError'>↑ %h(zErr)</span></td></tr> |
| 2252 | } |
| 2253 | @ <tr> |
| 2254 |