diff options
Diffstat (limited to '')
-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 |