diff options
-rw-r--r-- | mumi/web/view/html.scm | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 9771dee..d7b04d0 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -22,6 +22,7 @@ #:use-module (mumi config) #:use-module (mumi messages) #:use-module (mumi web view utils) + #:use-module (mumi web util) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) @@ -446,19 +447,50 @@ some examples.") (@ (class "message")) (div (@ (class "card")) - (div - (@ (class "card-header")) - (div (@ (class "from")) - (span (@ (class "address")) "Your comment"))) - (div - (@ (class "body card-body")) - (p "Comments via the web interface are not currently + ,@(if (mailer-enabled?) + `((form + (@ (action ,(format #f "/issue/~a/comment" + (number->string id))) + (enctype "multipart/form-data") + (method "POST")) + (input (@ (style "display:none") + (name "validation") + (placeholder "Please leave this empty.")) "") + (input (@ (type "hidden") + (name "timestamp") + (value ,(timestamp!))) "") + (div + (@ (class "card-header")) + (div (@ (class "from")) + (input (@ (class "address form-control") + (name "from") + (required "required") + (placeholder "Your name")) ""))) + (div + (@ (class "body card-body")) + (textarea (@ (name "text") + (required "required") + (class "form-control") + (placeholder "Please input your comment...")) + "")) + (div + (@ (class "card-footer")) + (button (@ (class "btn btn-primary") + (type "submit")) + "Send")))) + `((div + (@ (class "card-header")) + (div (@ (class "from")) + (span (@ (class "address")) "Your comment"))) + (div + (@ (class "body card-body")) + (p "Comments via the web interface are not currently supported. To comment on this conversation " - (a (@ (href ,(string-append "mailto:" - (number->string id) "@" (%config 'debbugs-domain) - "?subject=" (bug-subject* bug)))) - ,(string-append "send email to " - (number->string id) "@" (%config 'debbugs-domain))))))))) + (a (@ (href ,(string-append "mailto:" + (number->string id) "@" (%config 'debbugs-domain) + "?subject=" (bug-subject* bug)))) + ,(string-append "send email to " + (number->string id) "@" (%config 'debbugs-domain))))))))))) (div (@ (class "info col-md-3")) |