diff options
author | Jasper Van der Jeugt | 2020-07-30 17:23:24 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-07-30 17:23:24 +0200 |
commit | fe56ddfbd14b3e7fbaee8732641bcc00fbd0c856 (patch) | |
tree | 617450f2576b1d5d6575f48c739670efc3cbbb5e /client | |
parent | f4b0e4ec20cd903b7a603edfb043a21bb175b246 (diff) |
Forms wtf
Diffstat (limited to 'client')
-rw-r--r-- | client/src/Client.elm | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/client/src/Client.elm b/client/src/Client.elm index aa2121c..1938711 100644 --- a/client/src/Client.elm +++ b/client/src/Client.elm @@ -51,16 +51,22 @@ view model = case model of (\p -> Html.li [] [Html.text p]) game.view.opponents , Html.h1 [] [Html.text "You"] - , Html.input - [ Html.Attributes.value game.changeMyName - , Html.Events.onInput ChangeMyName + , Html.form + [ Html.Attributes.action "" + , Html.Events.onSubmit SubmitMyName ] - [] - , Html.button - [ Html.Events.onClick SubmitMyName - , Html.Attributes.disabled <| game.view.myName == game.changeMyName + [ Html.input + [ Html.Attributes.value game.changeMyName + , Html.Events.onInput ChangeMyName + ] + [] + , Html.button + [ Html.Attributes.type_ "submit" + , Html.Attributes.disabled <| + game.view.myName == game.changeMyName + ] + [Html.text "change"] ] - [Html.text "change"] ] subscriptions : Model -> Sub Msg |