summaryrefslogtreecommitdiff
path: root/elm/User
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-11-27 13:45:22 +0100
committerYorhel <git@yorhel.nl>2019-11-27 13:45:25 +0100
commit9c4835a94263127f780c0b96db89aa25ceefd960 (patch)
treecc0b6c4e584a4898aaa8c4f00ebb19c43a3d4adf /elm/User
parent7cb953265e54a731eb8a5c6bb0d4a45ea337fa80 (diff)
Elm: Use fieldset to disable the form while loading
I wasn't able to do this while the .maintabs used floats.
Diffstat (limited to 'elm/User')
-rw-r--r--elm/User/Edit.elm2
-rw-r--r--elm/User/Login.elm2
-rw-r--r--elm/User/PassReset.elm2
-rw-r--r--elm/User/PassSet.elm2
-rw-r--r--elm/User/Register.elm2
5 files changed, 5 insertions, 5 deletions
diff --git a/elm/User/Edit.elm b/elm/User/Edit.elm
index aec74d50..1a13cdb1 100644
--- a/elm/User/Edit.elm
+++ b/elm/User/Edit.elm
@@ -174,7 +174,7 @@ view model =
else formField "uniname::Display name" [ inputText "uniname" (if data.uniname == "" then data.username else data.uniname) (Set << Uniname) GUE.valUniname ]
]
- in Html.form [ onSubmit Submit ]
+ in form_ Submit (model.state == Api.Loading)
[ div [ class "mainbox" ]
[ h1 [] [ text <| if data.authmod then "Edit " ++ data.username else "My preferences" ]
, table [ class "formtable" ] <|
diff --git a/elm/User/Login.elm b/elm/User/Login.elm
index e3771777..bef69cb5 100644
--- a/elm/User/Login.elm
+++ b/elm/User/Login.elm
@@ -141,7 +141,7 @@ view model =
]
]
- in Html.form [ onSubmit Submit ]
+ in form_ Submit (model.state == Api.Loading)
[ if model.insecure then changeBox else loginBox
, div [ class "mainbox" ]
[ fieldset [ class "submit" ] [ submitButton "Submit" model.state True False ]
diff --git a/elm/User/PassReset.elm b/elm/User/PassReset.elm
index f22a16c8..ad265c87 100644
--- a/elm/User/PassReset.elm
+++ b/elm/User/PassReset.elm
@@ -68,7 +68,7 @@ view model =
[ p [] [ text "Your password has been reset and instructions to set a new one should reach your mailbox in a few minutes." ] ]
]
else
- Html.form [ onSubmit Submit ]
+ form_ Submit (model.state == Api.Loading)
[ div [ class "mainbox" ]
[ h1 [] [ text "Forgot Password" ]
, p []
diff --git a/elm/User/PassSet.elm b/elm/User/PassSet.elm
index a04cfe33..3c5c50bc 100644
--- a/elm/User/PassSet.elm
+++ b/elm/User/PassSet.elm
@@ -70,7 +70,7 @@ update msg model =
view : Model -> Html Msg
view model =
- Html.form [ onSubmit Submit ]
+ form_ Submit (model.state == Api.Loading)
[ div [ class "mainbox" ]
[ h1 [] [ text "Set your password" ]
, p [] [ text "Now you can set a password for your account. You will be logged in automatically after your password has been saved." ]
diff --git a/elm/User/Register.elm b/elm/User/Register.elm
index abbf5d63..d4749e47 100644
--- a/elm/User/Register.elm
+++ b/elm/User/Register.elm
@@ -78,7 +78,7 @@ view model =
[ p [] [ text "Your account has been created! In a few minutes, you should receive an email with instructions to set your password." ] ]
]
else
- Html.form [ onSubmit Submit ]
+ form_ Submit (model.state == Api.Loading)
[ div [ class "mainbox" ]
[ h1 [] [ text "Create an account" ]
, table [ class "formtable" ]