aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-08-09 20:29:21 +0200
committerJoris Guyonvarch2015-08-09 20:29:21 +0200
commit65f90115f7a84c74897d5ee0d11265efe77115db (patch)
tree8ec4a753a26055ae0732fd40936ef081c02d3920 /src/client
parent169d52bfbe8b7f95dcece3cef245cdd62336e2f8 (diff)
downloadbudget-65f90115f7a84c74897d5ee0d11265efe77115db.tar.gz
budget-65f90115f7a84c74897d5ee0d11265efe77115db.tar.bz2
budget-65f90115f7a84c74897d5ee0d11265efe77115db.zip
Simpler add payment with icons instead of text for labels
Diffstat (limited to 'src/client')
-rw-r--r--src/client/View/Payments/Add.elm17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm
index 88a1bd7..d1431b8 100644
--- a/src/client/View/Payments/Add.elm
+++ b/src/client/View/Payments/Add.elm
@@ -17,6 +17,7 @@ import Update.Payment.Add exposing (..)
import Model.View.Payment.Add exposing (..)
import View.Events exposing (onSubmitPrevDefault)
+import View.Icon exposing (renderIcon)
import Utils.Maybe exposing (isJust)
import Utils.Either exposing (toMaybeError)
@@ -33,16 +34,16 @@ addPayment addPayment =
]
[ div
[ class "name" ]
- [ label
- [ for "nameInput" ]
- [ text "Category" ]
- , input
+ [ input
[ id "nameInput"
, class (if isJust addPayment.nameError then "error" else "")
, value addPayment.name
, on "input" targetValue (Signal.message actions.address << UpdatePayment << UpdateAdd << UpdateName)
]
[]
+ , label
+ [ for "nameInput" ]
+ [ renderIcon "shopping-cart" ]
, case addPayment.nameError of
Just error ->
div [ class "errorMessage" ] [ text error ]
@@ -51,16 +52,16 @@ addPayment addPayment =
]
, div
[ class "cost" ]
- [ label
- [ for "costInput" ]
- [ text "Cost" ]
- , input
+ [ input
[ id "costInput"
, class (if isJust addPayment.costError then "error" else "")
, value addPayment.cost
, on "input" targetValue (Signal.message actions.address << UpdatePayment << UpdateAdd << UpdateCost)
]
[]
+ , label
+ [ for "costInput" ]
+ [ renderIcon "euro" ]
, case addPayment.costError of
Just error ->
div [ class "errorMessage" ] [ text error ]