From 75804df1cb231033f94183e41cdf79d36d8f6710 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 21 Aug 2016 14:30:40 +0200 Subject: Show a message if there is an error during a server request --- src/client/elm/Dialog/AddIncome/View.elm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client/elm/Dialog/AddIncome') diff --git a/src/client/elm/Dialog/AddIncome/View.elm b/src/client/elm/Dialog/AddIncome/View.elm index cc1ac13..c628d37 100644 --- a/src/client/elm/Dialog/AddIncome/View.elm +++ b/src/client/elm/Dialog/AddIncome/View.elm @@ -35,11 +35,11 @@ button : String -> LoggedData -> List (String, Field) -> String -> Html Msg -> M button className loggedData initialForm title buttonContent tooltip = let dialogConfig = { className = "incomeDialog" - , title = getMessage title loggedData.translations + , title = getMessage loggedData.translations title , body = \model -> addIncomeForm loggedData model.addIncome - , confirm = getMessage "Confirm" loggedData.translations + , confirm = getMessage loggedData.translations "Confirm" , confirmMsg = submitForm << .addIncome - , undo = getMessage "Undo" loggedData.translations + , undo = getMessage loggedData.translations "Undo" } in Html.button ( ( case tooltip of @@ -68,8 +68,8 @@ submitForm addIncome = Just data -> case data.id of Just incomeId -> - Msg.Dialog <| Dialog.UpdateAndClose <| Msg.UpdateLoggedIn <| LoggedInMsg.EditIncome incomeId data.amount data.date + Msg.Dialog <| Dialog.UpdateAndClose <| Msg.EditIncome incomeId data.amount data.date Nothing -> - Msg.Dialog <| Dialog.UpdateAndClose <| Msg.UpdateLoggedIn <| LoggedInMsg.CreateIncome data.amount data.date + Msg.Dialog <| Dialog.UpdateAndClose <| Msg.CreateIncome data.amount data.date Nothing -> Msg.Dialog <| Dialog.Update <| DialogMsg.AddIncomeMsg <| Form.Submit -- cgit v1.2.3