diff options
author | Yorhel <git@yorhel.nl> | 2020-01-29 10:43:53 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-01-29 10:43:55 +0100 |
commit | bc9bf70662fe35bcb4c6a89965d3b4f06bbbe783 (patch) | |
tree | 7b8b9ed6c914b986262625a05e38db09719c3a0a | |
parent | f6929bcf32edd7b0de9ff4a6096d53785d2d8777 (diff) |
Discussions.Edit: Make sure the "title" field is marked as required
This is normally handled by the TUWF::Validate-generated HTML5
validation attributes, but in this case the title field does not have
the 'required' attribute because it is absent for replies.
-rw-r--r-- | elm/Discussions/Edit.elm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elm/Discussions/Edit.elm b/elm/Discussions/Edit.elm index 03f9e581..9ca18bf1 100644 --- a/elm/Discussions/Edit.elm +++ b/elm/Discussions/Edit.elm @@ -209,7 +209,7 @@ view model = [ h1 [] [ text <| if model.tid == Nothing then "Create new thread" else "Edit post" ] , table [ class "formtable" ] <| [ if thread - then formField "title::Thread title" [ inputText "title" (Maybe.withDefault "" model.title) Title (style "width" "400px" :: GDE.valTitle) ] + then formField "title::Thread title" [ inputText "title" (Maybe.withDefault "" model.title) Title (style "width" "400px" :: required True :: GDE.valTitle) ] else formField "Topic" [ a [ href <| "/t" ++ String.fromInt (Maybe.withDefault 0 model.tid) ] [ text (Maybe.withDefault "" model.title) ] ] , if thread && model.can_mod then formField "" [ label [] [ inputCheck "" model.locked Locked, text " Locked" ] ] |