Differences From:
File
src/login.c
part of check-in
[7a39dde24b]
- Clean up and merge updates from trunk
by
robert on
2009-09-26 08:17:33.
Also file
src/login.c
part of check-in
[ca08c1d1b3]
- place the cursor in the username text box on the login screen.
by
rwilson on
2009-09-23 16:54:54.
[view]
To:
File
src/login.c
part of check-in
[00b778bd58]
- Added new config option with the rather unwieldy name 'anon-login-enable-captcha-filler'
by
stephan on
2009-12-07 22:42:42.
Also file
src/login.c
part of check-in
[1c2d878d12]
- Merge with trunk
by
btheado on
2009-12-13 01:16:13.
[view]
@@ -226,9 +226,9 @@
}
@ </tr>
@ <tr>
@ <td align="right">Password:</td>
- @ <td><input type="password" name="p" value="" size=30></td>
+ @ <td><input type="password" id="p" name="p" value="" size=30></td>
@ </tr>
if( g.zLogin==0 ){
zAnonPw = db_text(0, "SELECT pw FROM user"
" WHERE login='anonymous'"
@@ -251,16 +251,22 @@
@ You must configure your web browser to accept cookies in order for
@ the login to take.</p>
if( zAnonPw ){
unsigned int uSeed = captcha_seed();
- char *zCaptcha = captcha_render(captcha_decode(uSeed));
-
- @ <input type="hidden" name="cs" value="%u(uSeed)">
+ char const * zDecoded = captcha_decode(uSeed);
+ int iAllowPasswordFill = db_get_boolean( "anon-login-enable-captcha-filler", 0 );
+ char *zCaptcha = captcha_render(zDecoded);
+
+ @ <input type="hidden" name="cs" value="%u(uSeed)"/>
@ <p>Visitors may enter <b>anonymous</b> as the user-ID with
@ the 8-character hexadecimal password shown below:</p>
@ <center><table border="1" cellpadding="10"><tr><td><pre>
@ %s(zCaptcha)
- @ </pre></td></tr></table></center>
+ @ </pre></td></tr></table>
+ if( iAllowPasswordFill ) {
+ @ <input type="button" value="Fill out captcha" onclick="document.getElementById('u').value='anonymous'; document.getElementById('p').value='%s(zDecoded)';"/>
+ }
+ @ </center>
free(zCaptcha);
}
if( g.zLogin ){
@ <br clear="both"><hr>