diff options
Diffstat (limited to 'haunt/jakob/dynamic/capabilities/comment-form.scm')
| -rw-r--r-- | haunt/jakob/dynamic/capabilities/comment-form.scm | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/haunt/jakob/dynamic/capabilities/comment-form.scm b/haunt/jakob/dynamic/capabilities/comment-form.scm index 9e6e81c..f7d0491 100644 --- a/haunt/jakob/dynamic/capabilities/comment-form.scm +++ b/haunt/jakob/dynamic/capabilities/comment-form.scm @@ -33,23 +33,20 @@ render-dynamic-comment-form get-comment-form)) -(define (render-commenter-info-field) - `(fieldset (@ (id "commenter-info")) - (legend "Commenter Info") - (label (@ (for "name")) "Name:") - (input (@ (type "text") (id "name") (name "name") (required #t) (size 24))) - (label (@ (for "email")) "Email (optional, used for Gravatar):") - (input (@ (type "text") (id "email") (name "email") (size 24))) - (label (@ (for "url")) "Webpage URL (optional):") - (input (@ (type "text") (id "url") (name "url") (size 24))))) - -(define (render-comment-content-field) +(define (render-comment-field) `(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))))) + (label (@ (for "name") (class "required")) "Name:") + (input (@ (type "text") (id "name") (name "name") (required #t))) + (label (@ (for "email")) "Email:") + (input (@ (type "text") (id "email") (name "email"))) + (label (@ (for "url")) "Webpage URL:") + (input (@ (type "text") (id "url") (name "url"))) + (label (@ (for "subject")) "Subject:") + (input (@ (type "text") (id "subject") (name "subject"))) + (label (@ (for "comment") (class "required")) "Comment :") + (textarea (@ (id "coment") (name "comment"))) + (p "(*) Indicates a required field."))) (define* (render-comment-captcha-field #:optional (captcha-id "") captcha-image #:key hidden) @@ -79,8 +76,7 @@ (h1 "Comment form") (form (@ (id "comment-input") (action "/api/comment") (method "post")) (input (@ (type "text") (name "slug") (hidden #t) (value ,slug))) - ,(render-commenter-info-field) - ,(render-comment-content-field) + ,(render-comment-field) ,(render-comment-captcha-field captcha-id captcha-image)) ,(script "proof-of-work.js"))) @@ -99,8 +95,7 @@ (id "reply-to") (hidden #t) (value ""))) - ,(render-commenter-info-field) - ,(render-comment-content-field) + ,(render-comment-field) (fieldset (@ (id "captcha-trigger-block")) (legend "Captcha") (label "You need to complete a captcha to write a comment.") |