aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/View/Payments/Add.elm6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm
index 3aa44c8..ce4738b 100644
--- a/src/client/View/Payments/Add.elm
+++ b/src/client/View/Payments/Add.elm
@@ -35,10 +35,9 @@ addPayment model addPayment =
onSubmitPrevDefault actions.address (UpdatePayment <| UpdateAdd <| AddError (toMaybeError resName) (toMaybeError resCost))
]
[ div
- [ class "name" ]
+ [ class ("name " ++ (if isJust addPayment.nameError then "error" else "")) ]
[ input
[ id "nameInput"
- , class (if isJust addPayment.nameError then "error" else "")
, value addPayment.name
, on "input" targetValue (Signal.message actions.address << UpdatePayment << UpdateAdd << UpdateName)
]
@@ -53,10 +52,9 @@ addPayment model addPayment =
text ""
]
, div
- [ class "cost" ]
+ [ class ("cost " ++ (if isJust addPayment.costError then "error" else "")) ]
[ input
[ id "costInput"
- , class (if isJust addPayment.costError then "error" else "")
, value addPayment.cost
, on "input" targetValue (Signal.message actions.address << UpdatePayment << UpdateAdd << UpdateCost)
]