From 023f0bcb04d78f0286603883917252f4594c35d2 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 20 Dec 2022 23:42:49 +0100 Subject: html: Remove discrepancy between disabled/enabled mailer. --- mumi/web/view/html.scm | 87 +++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index cb80f8f..fa8df89 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -549,46 +549,47 @@ failed to process associated messages.") (list (number->string n))))))))) '())))) (define mailer-form - `((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 "avatar") - (style "background-color:#bc80bd")) "?") - (article - (@ (class "message")) - (header - (div (@ (class "from")) - (input (@ (class "address form-control") - (name "from") - (required "required") - (placeholder "Your name")) ""))) - (textarea (@ (name "text") - (required "required") - (class "form-control") - (placeholder "Please input your comment...")) - "") - (footer - (button (@ (type "submit")) "Send") - (span - (@ (class "ml-3")) - "You may also " - (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))) - " to comment.")))))) + `(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 "avatar") + (style "background-color:#bc80bd")) "?") + (article + (@ (class "message")) + (header + (div (@ (class "from")) + (input (@ (class "address form-control") + (name "from") + (required "required") + (placeholder "Your name")) ""))) + (textarea (@ (name "text") + (required "required") + (class "form-control") + (placeholder "Please input your comment...")) + "") + (footer + (button (@ (type "submit")) "Send") + (span + (@ (class "ml-3")) + "You may also " + (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))) + " to comment."))))) (define disabled-mailer - `((div + `(div + (div (@ (class "avatar") (style "background-color:#bc80bd")) "?") (article @@ -610,10 +611,10 @@ currently disabled.")) `(div (@ (class "comment-box")) (a (@ (id "comment"))) - ,@(if (and (mailer-enabled?) - (not (bug-archived bug))) - mailer-form - disabled-mailer))) + ,(if (and (mailer-enabled?) + (not (bug-archived bug))) + mailer-form + disabled-mailer))) (define (show-message message-number message previous-subject) `((div (a (@ (class "message-anchor") -- cgit v1.2.3