diff options
author | Yorhel <git@yorhel.nl> | 2019-10-01 16:44:09 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-10-01 16:46:14 +0200 |
commit | 1a9a4b4bdb8f3b6d7d0ad12032c17c44a8287a09 (patch) | |
tree | 7d5082d95647de2bdfa87c99eb68488d293da923 /elm | |
parent | 9fd566e41a5a187c104de6869e9583ea5a19585c (diff) |
Minor refactor: Actually, let's split up RegReset.pm
This way we have a 1-to-1 mapping between VNWeb::* stuff and elm/
modules, which makes it much easier to see which code belongs to what.
I did add a VNWeb::User::Edit stub for definitions that can be re-used
among the small forms.
Diffstat (limited to 'elm')
-rw-r--r-- | elm/User/Login.elm | 10 | ||||
-rw-r--r-- | elm/User/PassReset.elm | 4 | ||||
-rw-r--r-- | elm/User/PassSet.elm | 6 | ||||
-rw-r--r-- | elm/User/Register.elm | 8 |
4 files changed, 14 insertions, 14 deletions
diff --git a/elm/User/Login.elm b/elm/User/Login.elm index 0adaef4f..224f84fb 100644 --- a/elm/User/Login.elm +++ b/elm/User/Login.elm @@ -8,7 +8,7 @@ import Browser import Browser.Navigation exposing (load) import Lib.Api as Api import Gen.Api as GApi -import Gen.UserLogin as GUL +import Gen.UserEdit as GUE import Gen.Types exposing (adminEMail) import Lib.Html exposing (..) @@ -100,7 +100,7 @@ view model = , table [ class "formtable" ] [ tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "username" ] [ text "Username" ]] - , td [ class "field" ] [ inputText "username" model.username Username GUL.valUsername ] + , td [ class "field" ] [ inputText "username" model.username Username GUE.valUsername ] ] , tr [] [ td [] [] @@ -108,7 +108,7 @@ view model = ] , tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "password" ] [ text "Password" ]] - , td [ class "field" ] [ inputPassword "password" model.password Password GUL.valPassword ] + , td [ class "field" ] [ inputPassword "password" model.password Password GUE.valPassword ] ] , tr [] [ td [] [] @@ -141,12 +141,12 @@ view model = , table [ class "formtable" ] [ tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "newpass1" ] [ text "New password" ]] - , td [ class "field" ] [ inputPassword "newpass1" model.newpass1 Newpass1 GUL.valPassword ] + , td [ class "field" ] [ inputPassword "newpass1" model.newpass1 Newpass1 GUE.valPassword ] ] , tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "newpass2" ] [ text "Repeat" ]] , td [ class "field" ] - [ inputPassword "newpass2" model.newpass2 Newpass2 GUL.valPassword + [ inputPassword "newpass2" model.newpass2 Newpass2 GUE.valPassword , if model.noteq then b [ class "standout" ] [ text "Passwords do not match" ] else text "" ] ] diff --git a/elm/User/PassReset.elm b/elm/User/PassReset.elm index f1c36058..dd520494 100644 --- a/elm/User/PassReset.elm +++ b/elm/User/PassReset.elm @@ -7,7 +7,7 @@ import Json.Encode as JE import Browser import Lib.Api as Api import Gen.Api as GApi -import Gen.RegReset as GRR +import Gen.UserEdit as GUE import Lib.Html exposing (..) @@ -79,7 +79,7 @@ view model = , table [ class "formtable" ] [ tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "email" ] [ text "E-Mail" ]] - , td [ class "field" ] [ inputText "email" model.email EMail GRR.valEmail ] + , td [ class "field" ] [ inputText "email" model.email EMail GUE.valEmail ] ] ] ] diff --git a/elm/User/PassSet.elm b/elm/User/PassSet.elm index 0756196d..3662dcd3 100644 --- a/elm/User/PassSet.elm +++ b/elm/User/PassSet.elm @@ -8,7 +8,7 @@ import Browser import Browser.Navigation exposing (load) import Lib.Api as Api import Gen.Api as GApi -import Gen.RegReset as GRR +import Gen.UserEdit as GUE import Lib.Html exposing (..) @@ -77,12 +77,12 @@ view model = , table [ class "formtable" ] [ tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "newpass1" ] [ text "New password" ]] - , td [ class "field" ] [ inputPassword "newpass1" model.newpass1 Newpass1 GRR.valPassword ] + , td [ class "field" ] [ inputPassword "newpass1" model.newpass1 Newpass1 GUE.valPassword ] ] , tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "newpass2" ] [ text "Repeat" ]] , td [ class "field" ] - [ inputPassword "newpass2" model.newpass2 Newpass2 GRR.valPassword + [ inputPassword "newpass2" model.newpass2 Newpass2 GUE.valPassword , if model.noteq then b [ class "standout" ] [ text "Passwords do not match" ] else text "" ] ] diff --git a/elm/User/Register.elm b/elm/User/Register.elm index 6e65893f..65571475 100644 --- a/elm/User/Register.elm +++ b/elm/User/Register.elm @@ -7,7 +7,7 @@ import Json.Encode as JE import Browser import Lib.Api as Api import Gen.Api as GApi -import Gen.RegReset as GRR +import Gen.UserEdit as GUE import Lib.Html exposing (..) @@ -84,7 +84,7 @@ view model = , table [ class "formtable" ] [ tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "username" ] [ text "Username" ]] - , td [ class "field" ] [ inputText "username" model.username Username GRR.valUsername ] + , td [ class "field" ] [ inputText "username" model.username Username GUE.valUsername ] ] , tr [] [ td [] [] @@ -92,7 +92,7 @@ view model = ] , tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "email" ] [ text "E-Mail" ]] - , td [ class "field" ] [ inputText "email" model.email EMail GRR.valEmail ] + , td [ class "field" ] [ inputText "email" model.email EMail GUE.valEmail ] ] , tr [] [ td [] [] @@ -106,7 +106,7 @@ view model = ] , tr [ class "newfield" ] [ td [ class "label" ] [ label [ for "vns" ] [ text "Answer" ]] - , td [ class "field" ] [ inputText "vns" (if model.vns == 0 then "" else String.fromInt model.vns) VNs GRR.valVns ] + , td [ class "field" ] [ inputText "vns" (if model.vns == 0 then "" else String.fromInt model.vns) VNs [] ] ] ] ] |