diff options
author | Joris | 2015-09-06 16:23:48 +0200 |
---|---|---|
committer | Joris | 2015-09-06 16:23:48 +0200 |
commit | 0b6f0fa29075178b45cb17d2932003ab4b342280 (patch) | |
tree | 8fcdf55131683978b5593a07078d8002df4540d9 /src/client/View/Payments/Add.elm | |
parent | 0ae7d068263dffbc1cc2dc92c7829dd0037c97e7 (diff) |
Use buttons or links when elements are clickable
Diffstat (limited to 'src/client/View/Payments/Add.elm')
-rw-r--r-- | src/client/View/Payments/Add.elm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm index deffb95..f352f1f 100644 --- a/src/client/View/Payments/Add.elm +++ b/src/client/View/Payments/Add.elm @@ -28,8 +28,7 @@ import Utils.Either exposing (toMaybeError) addPayment : Model -> LoggedView -> Html addPayment model loggedView = H.form - [ class "add" - , case (validateName loggedView.add.name model.translations, validateCost loggedView.add.cost model.translations) of + [ case (validateName loggedView.add.name model.translations, validateCost loggedView.add.cost model.translations) of (Ok name, Ok cost) -> let action = case loggedView.add.frequency of @@ -43,7 +42,8 @@ addPayment model loggedView = , addPaymentCost model loggedView.add , paymentFrequency model loggedView.add , button - [ type' "submit" ] + [ type' "submit" + , class "add" ] [ text (getMessage "Add" model.translations)] ] @@ -91,8 +91,9 @@ addPaymentCost model addPayment = paymentFrequency : Model -> AddPayment -> Html paymentFrequency model addPayment = - div - [ class "frequency" + button + [ type' "button" + , class "frequency" , onClick actions.address (UpdateLoggedView << UpdateAdd <| ToggleFrequency) ] [ div |