Mark comment boxes as required
authorLanius Trolling <lanius@laniustrolling.dev>
Mon, 13 Feb 2023 22:15:54 +0000 (17:15 -0500)
committerLanius Trolling <lanius@laniustrolling.dev>
Mon, 13 Feb 2023 22:15:54 +0000 (17:15 -0500)
src/main/kotlin/info/mechyrdia/data/view_comments.kt

index 320eb0fcb16445422ba31d1af9f2579afdeb1d4e..2a53f7292bd7821931ee3cb87b8c863fc56bf93e 100644 (file)
@@ -127,6 +127,7 @@ fun FlowContent.commentBox(comment: CommentRenderData, loggedInAs: Id<NationData
                        div(classes = "comment-preview")
                        textArea(classes = "comment-markup") {
                                name = "comment"
+                               required = true
                                +comment.contentsRaw
                        }
                        installCsrfToken(createCsrfToken(formPath))
@@ -152,6 +153,7 @@ fun FlowContent.commentInput(commentingOn: String, commentingAs: NationData?) {
        form(action = formPath, method = FormMethod.post, classes = "comment-input") {
                div(classes = "comment-preview")
                textArea(classes = "comment-markup") {
+                       required = true
                        name = "comment"
                }
                installCsrfToken(createCsrfToken(formPath))