1. Luke Plant
  2. haskellblog

Commits

Luke Plant  committed f504e04

Fixed display of error messages for comment submission

  • Participants
  • Parent commits c44a91a
  • Branches default

Comments (0)

Files changed (2)

File src/Blog/Views.hs

View file
  • Ignore whitespace
                         ("commentAccepted", commentStage == CommentAccepted)
                         ("commentInvalid", commentStage == CommentInvalid)
                         ("newComment", commentTemplateInfo commentData)
-                        ("commentErrors", commentErrors)
+                        ("commentErrors", Map.toList $ commentErrors)
                         ("categories", map categoryTemplateInfo cats)
                         ("comments", map commentTemplateInfo comments)
                         ("hasComments", not $ null comments)

File src/templates/post.st

View file
  • Ignore whitespace
     $if(commentInvalid)$
       <div class="validationerror">
       <ul>
-        $commentErrors:{ <li>$it.message$</li> }$
+        $commentErrors:{ <li>$it.1$</li> }$
       </ul>
       </div>
     $endif$