summaryrefslogtreecommitdiff
path: root/haunt/jakob/dynamic/capabilities/comment-form.scm
diff options
context:
space:
mode:
Diffstat (limited to 'haunt/jakob/dynamic/capabilities/comment-form.scm')
-rw-r--r--haunt/jakob/dynamic/capabilities/comment-form.scm13
1 files changed, 6 insertions, 7 deletions
diff --git a/haunt/jakob/dynamic/capabilities/comment-form.scm b/haunt/jakob/dynamic/capabilities/comment-form.scm
index 70e5303..1754dfd 100644
--- a/haunt/jakob/dynamic/capabilities/comment-form.scm
+++ b/haunt/jakob/dynamic/capabilities/comment-form.scm
@@ -30,14 +30,13 @@
#:export (get-comment-form))
(define (render-comment-form slug)
- (let-values (((mac solution captcha-image) (new-captcha)))
+ (let-values (((captcha-id captcha-image) (new-captcha!)))
`((div (@ (id "comment-form"))
(h1 "Comment form")
(form (@ (id "comment-input") (action "/api/comment") (method "post"))
(input (@ (type "text") (name "slug") (hidden #t) (value ,slug)))
- (input (@ (type "text") (name "solution") (hidden #t) (value ,solution)))
- (input (@ (type "text") (name "solution-mac") (hidden #t) (value ,mac)))
- (fieldset
+ (input (@ (type "text") (name "captcha-id") (hidden #t) (value ,captcha-id)))
+ (fieldset (@ (id "commenter-info"))
(legend "Commenter Info")
(label (@ (for "name")) "Name:")
(input (@ (type "text") (id "name") (name "name") (required #t) (size 24)))
@@ -45,15 +44,15 @@
(input (@ (type "text") (id "email") (name "email") (size 24)))
(label (@ (for "url")) "Webpage URL (optional):")
(input (@ (type "text") (id "url") (name "url") (size 24))))
- (fieldset
+ (fieldset (@ (id "comment-content"))
(legend "Comment")
(label (@ (for "subject")) "Subject (optional):")
(input (@ (type "text") (id "subject") (name "subject") (size 24)))
(label (@ (for "comment")) "Comment :")
(textarea (@ (id "coment") (name "comment") (rows 4) (cols 50))))
- (fieldset
+ (fieldset (@ (id "comment-captcha"))
(legend "Captcha")
- (label (@ (for "captcha")) "Captcha:")
+ (label (@ (for "captcha")) "Please evaluate the following definite integral:")
(img (@ (src ,(format #f "data:image/jpeg;charset=utf-8;base64,~a"
(base64-encode captcha-image)))))
(input (@ (type "text") (id "captcha") (name "captcha") (size 24)))