diff options
author | Joris | 2015-09-12 23:57:16 +0200 |
---|---|---|
committer | Joris | 2015-09-12 23:57:16 +0200 |
commit | a48e79e2f7c1ab1ffb52b86ef9e900c75c5d023b (patch) | |
tree | 05a613aef2d338f10bcdd394e520450656ed8f1c /src/client/View/LoggedIn/Add.elm | |
parent | d87dbd1360c14df83552fd757438c23e5d7b9f9c (diff) | |
download | budget-a48e79e2f7c1ab1ffb52b86ef9e900c75c5d023b.tar.gz budget-a48e79e2f7c1ab1ffb52b86ef9e900c75c5d023b.tar.bz2 budget-a48e79e2f7c1ab1ffb52b86ef9e900c75c5d023b.zip |
Adding UI income read-only
Diffstat (limited to 'src/client/View/LoggedIn/Add.elm')
-rw-r--r-- | src/client/View/LoggedIn/Add.elm | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/client/View/LoggedIn/Add.elm b/src/client/View/LoggedIn/Add.elm index acdda2d..bae3853 100644 --- a/src/client/View/LoggedIn/Add.elm +++ b/src/client/View/LoggedIn/Add.elm @@ -50,7 +50,11 @@ addPayment model loggedInView = addPaymentName : AddPayment -> Html addPaymentName addPayment = div - [ class ("name " ++ (if isJust addPayment.nameError then "error" else "")) ] + [ classList + [ ("name", True) + , ("error", isJust addPayment.nameError) + ] + ] [ input [ id "nameInput" , value addPayment.name @@ -71,7 +75,11 @@ addPaymentName addPayment = addPaymentCost : Model -> AddPayment -> Html addPaymentCost model addPayment = div - [ class ("cost " ++ (if isJust addPayment.costError then "error" else "")) ] + [ classList + [ ("cost", True) + , ("error", isJust addPayment.costError) + ] + ] [ input [ id "costInput" , value addPayment.cost @@ -97,9 +105,17 @@ paymentFrequency model addPayment = , onClick actions.address (UpdateLoggedIn << UpdateAdd <| ToggleFrequency) ] [ div - [ class ("punctual" ++ if addPayment.frequency == Punctual then " selected" else "") ] + [ classList + [ ("punctual", True) + , ("selected", addPayment.frequency == Punctual) + ] + ] [ text (getMessage "Punctual" model.translations) ] , div - [ class ("monthly" ++ if addPayment.frequency == Monthly then " selected" else "") ] + [ classList + [ ("monthly", True) + , ("selected", addPayment.frequency == Monthly) + ] + ] [ text (getMessage "Monthly" model.translations) ] ] |