From cc6a51b5ca03ee1a3b5de7c32dd1324e1053f42a Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 5 Sep 2015 14:14:25 +0200 Subject: Renaming PaymentView to LoggedView --- src/client/View/Payments/Add.elm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/client/View/Payments/Add.elm') diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm index 32233ed..77d40ea 100644 --- a/src/client/View/Payments/Add.elm +++ b/src/client/View/Payments/Add.elm @@ -17,7 +17,7 @@ import Update.Payment.Add exposing (..) import Model exposing (Model) import Model.View.Payment.Add exposing (..) import Model.Translations exposing (getMessage) -import Model.View.PaymentView exposing (PaymentView) +import Model.View.LoggedView exposing (LoggedView) import View.Events exposing (onSubmitPrevDefault) import View.Icon exposing (renderIcon) @@ -25,18 +25,18 @@ import View.Icon exposing (renderIcon) import Utils.Maybe exposing (isJust) import Utils.Either exposing (toMaybeError) -addPayment : Model -> PaymentView -> Html -addPayment model paymentView = +addPayment : Model -> LoggedView -> Html +addPayment model loggedView = H.form [ class "add" - , case (validateName paymentView.add.name model.translations, validateCost paymentView.add.cost model.translations) of + , case (validateName loggedView.add.name model.translations, validateCost loggedView.add.cost model.translations) of (Ok name, Ok cost) -> - onSubmitPrevDefault serverCommunications.address (SC.AddPayment paymentView.me name cost) + onSubmitPrevDefault serverCommunications.address (SC.AddPayment loggedView.me name cost) (resName, resCost) -> onSubmitPrevDefault actions.address (UpdatePayment <| UpdateAdd <| AddError (toMaybeError resName) (toMaybeError resCost)) ] - [ addPaymentName paymentView.add - , addPaymentCost model paymentView.add + [ addPaymentName loggedView.add + , addPaymentCost model loggedView.add , button [ type' "submit" ] [ text (getMessage "Add" model.translations)] -- cgit v1.2.3