aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/SignIn.elm
diff options
context:
space:
mode:
authorJoris2015-12-29 22:38:42 +0100
committerJoris2015-12-29 22:38:42 +0100
commita7db22556b91bc7c499e010b4c051f4442ad8ce2 (patch)
tree9f991523cee681bf179c191260b95672f1c44def /src/client/View/SignIn.elm
parentc79fa3e212e8bb49f950da3c3218e32e3b9df2ec (diff)
downloadbudget-a7db22556b91bc7c499e010b4c051f4442ad8ce2.tar.gz
budget-a7db22556b91bc7c499e010b4c051f4442ad8ce2.tar.bz2
budget-a7db22556b91bc7c499e010b4c051f4442ad8ce2.zip
Using persona to validate emails
Diffstat (limited to 'src/client/View/SignIn.elm')
-rw-r--r--src/client/View/SignIn.elm57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/client/View/SignIn.elm b/src/client/View/SignIn.elm
deleted file mode 100644
index 2a6cbca..0000000
--- a/src/client/View/SignIn.elm
+++ /dev/null
@@ -1,57 +0,0 @@
-module View.SignIn
- ( renderSignIn
- ) where
-
-import Html as H exposing (..)
-import Html.Attributes exposing (..)
-import Html.Events exposing (..)
-
-import Json.Decode as Json
-
-import Update exposing (..)
-import Update.SignIn exposing (..)
-
-import ServerCommunication as SC
-import ServerCommunication exposing (serverCommunications)
-
-import Model exposing (Model)
-import Model.View.SignInView exposing (..)
-import Model.Translations exposing (getMessage)
-
-import View.Events exposing (onSubmitPrevDefault)
-
-renderSignIn : Model -> SignInView -> Html
-renderSignIn model signInView =
- div
- [ class "signIn" ]
- [ H.form
- [ onSubmitPrevDefault serverCommunications.address (SC.SignIn signInView.login) ]
- [ input
- [ value signInView.login
- , on "input" targetValue (Signal.message actions.address << UpdateSignIn << UpdateLogin)
- ]
- []
- , button
- []
- [ text (getMessage "SignIn" model.translations)]
- ]
- , div
- [ class "result" ]
- [ signInResult model signInView ]
- ]
-
-signInResult : Model -> SignInView -> Html
-signInResult model signInView =
- case signInView.result of
- Just result ->
- case result of
- Ok login ->
- div
- [ class "success" ]
- [ text (getMessage "SignInEmailSent" model.translations) ]
- Err error ->
- div
- [ class "error" ]
- [ text error ]
- Nothing ->
- text ""