aboutsummaryrefslogtreecommitdiff
path: root/src/client/View
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-08-12 22:40:21 +0200
committerJoris Guyonvarch2015-08-12 22:40:21 +0200
commit398477cb76fc8346a41afb11fc65d97eb24ba06e (patch)
treeabc81551348a15ad83e7ca247c4d95fb13bfb195 /src/client/View
parent999e05703f028ff21232b501f4af8d1b246ea3de (diff)
Input and label design glued together
Diffstat (limited to 'src/client/View')
-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)
]