aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/View
diff options
context:
space:
mode:
authorJoris2016-06-13 18:21:19 +0200
committerJoris2016-06-13 18:21:19 +0200
commit9716f77d14ef43f96a1534d97bb9d336df1882be (patch)
tree34d049a264dd7e24678fa97ce0cc948e46a4debf /src/client/elm/LoggedIn/Home/View
parentc43d8f886d48ca3d58f1614f1eddfe374081f3db (diff)
Use simple-form for search and set style
Diffstat (limited to 'src/client/elm/LoggedIn/Home/View')
-rw-r--r--src/client/elm/LoggedIn/Home/View/Search.elm19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/client/elm/LoggedIn/Home/View/Search.elm b/src/client/elm/LoggedIn/Home/View/Search.elm
index a4f727a..62db1b2 100644
--- a/src/client/elm/LoggedIn/Home/View/Search.elm
+++ b/src/client/elm/LoggedIn/Home/View/Search.elm
@@ -5,6 +5,10 @@ module LoggedIn.Home.View.Search exposing
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
+import Html.App as Html
+
+import Form exposing (Form)
+import View.Form as Form
import Msg exposing (Msg)
import LoggedIn.Msg as LoggedInMsg
@@ -16,14 +20,7 @@ import Model.Translations exposing (getMessage)
paymentsSearch : LoggedData -> HomeModel.Model -> Html Msg
paymentsSearch loggedData { search } =
- Html.div
- [ class "search" ]
- [ span
- [ class "label" ]
- [ text (getMessage "Search" loggedData.translations) ]
- , input
- [ value search
- , onInput (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdateSearch)
- ]
- []
- ]
+ let htmlMap = Html.map (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.SearchMsg)
+ in Html.div
+ [ class "search" ]
+ [ Form.textInput loggedData.translations search htmlMap "searchText" ]