Discussion:
r10016 - in apps/gobi/trunk/code: Page User
h***@helma.org
2010-03-13 22:33:57 UTC
Permalink
Author: hannes
Date: 2010-03-13 23:33:57 +0100 (Sat, 13 Mar 2010)
New Revision: 10016

Modified:
apps/gobi/trunk/code/Page/PageActions.js
apps/gobi/trunk/code/User/create.skin
Log:
Allow captcha to be renewed


Details at http://dev.helma.org/trac/helma/changeset/10016

Modified: apps/gobi/trunk/code/Page/PageActions.js
===================================================================
--- apps/gobi/trunk/code/Page/PageActions.js 2010-03-13 21:27:15 UTC (rev 10015)
+++ apps/gobi/trunk/code/Page/PageActions.js 2010-03-13 22:33:57 UTC (rev 10016)
@@ -765,6 +765,9 @@
}

function captcha_action() {
+ if (req.data.renew) {
+ session.data.captcha = new jala.Captcha();
+ }
if (session.data.captcha) {
session.data.captcha.renderImage();
}

Modified: apps/gobi/trunk/code/User/create.skin
===================================================================
--- apps/gobi/trunk/code/User/create.skin 2010-03-13 21:27:15 UTC (rev 10015)
+++ apps/gobi/trunk/code/User/create.skin 2010-03-13 22:33:57 UTC (rev 10016)
@@ -12,8 +12,9 @@

<% this.formEditor %>

-<img src="captcha" alt="captcha"><br>
-Enter Captcha (reload to get a new one)<br>
+<img src="captcha" id="captcha" alt="captcha"><br>
+Enter Captcha (<a href="#"
+ onclick="document.getElementById('captcha').src='captcha?renew=' + Math.random(); return false;">request a new one</a>)<br>
<input name="captcha">
<br><br>

Loading...