Revision 8384
Added by ben leinfelder about 11 years ago
ldapRegister.tmpl | ||
---|---|---|
35 | 35 |
[% END %] |
36 | 36 |
<p class="label text-error">[% errorMessage %]<p> |
37 | 37 |
<p> |
38 |
<script type="text/javascript" language="JavaScript1.2"> |
|
39 |
|
|
40 |
<!-- |
|
41 |
document.loginForm.givenName.focus(); |
|
42 |
document.loginForm.givenName.select(); |
|
43 | 38 |
|
44 |
if(window.document.captureEvents != null) |
|
45 |
{ |
|
46 |
window.document.captureEvents(Event.KEYPRESS); |
|
47 |
window.document.onKeyPress = doSubmit; |
|
48 |
} |
|
49 |
|
|
50 |
function doSubmit(event) |
|
51 |
{ |
|
52 |
var key; |
|
53 |
if(document.all) // IE |
|
54 |
key = String.fromCharCode(window.events.keyCode); |
|
55 |
else |
|
56 |
key = String.fromCharCode(event.which); |
|
57 |
|
|
58 |
if(key == "\r" || key == "\n") |
|
59 |
document.loginForm.submit(); |
|
60 |
} |
|
61 |
// --> |
|
62 |
</script> |
|
63 |
|
|
64 | 39 |
<form name="loginForm" action="[% cgiurl %]" method="post"> |
65 | 40 |
<input type="hidden" name="stage" value="[% stage %]"/> |
66 | 41 |
<input type="hidden" name="cfg" value="[% cfg %]"/> |
... | ... | |
205 | 180 |
callback: Recaptcha.focus_response_field}); |
206 | 181 |
return false; |
207 | 182 |
} |
183 |
showRecaptcha('captchaArea'); |
|
208 | 184 |
</script> |
209 | 185 |
</td> |
210 | 186 |
</tr> |
Also available in: Unified diff
show recaptcha on load without user having to click. works in both metacatUI and in traditional server-side skin (cfg=account)