From f8c5ce08352950f4e74f3c51aa16ef366a9de9c7 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Wed, 12 Aug 2015 11:37:29 +0200 Subject: Translating payment screen except dates --- src/client/View/Payments/Add.elm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/client/View/Payments') diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm index d1431b8..3aa44c8 100644 --- a/src/client/View/Payments/Add.elm +++ b/src/client/View/Payments/Add.elm @@ -14,7 +14,9 @@ import Update exposing (..) import Update.Payment exposing (..) import Update.Payment.Add exposing (..) +import Model exposing (Model) import Model.View.Payment.Add exposing (..) +import Model.Translations exposing (getMessage) import View.Events exposing (onSubmitPrevDefault) import View.Icon exposing (renderIcon) @@ -22,11 +24,11 @@ import View.Icon exposing (renderIcon) import Utils.Maybe exposing (isJust) import Utils.Either exposing (toMaybeError) -addPayment : AddPayment -> Html -addPayment addPayment = +addPayment : Model -> AddPayment -> Html +addPayment model addPayment = H.form [ class "add" - , case (validateName addPayment.name, validateCost addPayment.cost) of + , case (validateName addPayment.name model.translations, validateCost addPayment.cost model.translations) of (Ok name, Ok cost) -> onSubmitPrevDefault serverCommunications.address (SC.AddPayment name cost) (resName, resCost) -> @@ -69,6 +71,6 @@ addPayment addPayment = text "" , button [ type' "submit" ] - [ text "Add" ] + [ text (getMessage "Add" model.translations)] ] ] -- cgit v1.2.3