aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/View/Form.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/View/Form.elm')
-rw-r--r--src/client/elm/View/Form.elm12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/elm/View/Form.elm b/src/client/elm/View/Form.elm
index 1522b1f..5f642fb 100644
--- a/src/client/elm/View/Form.elm
+++ b/src/client/elm/View/Form.elm
@@ -1,6 +1,7 @@
module View.Form exposing
( textInput
, radioInputs
+ , hiddenSubmit
)
import Html exposing (..)
@@ -41,7 +42,8 @@ textInput translations form formName fieldName =
[ for (formName ++ fieldName) ]
[ text (Translations.getMessage (formName ++ fieldName) translations) ]
, button
- [ onClick (Form.Input fieldName Field.EmptyField)
+ [ type' "button"
+ , onClick (Form.Input fieldName Field.EmptyField)
, tabindex -1
]
[ FontAwesome.times Color.silver 15 ]
@@ -98,3 +100,11 @@ formError translations error =
SmallerIntThan n -> errorElement "SmallerIntThan" [toString n]
GreaterIntThan n -> errorElement "GreaterIntThan" [toString n]
error -> errorElement (toString error) []
+
+hiddenSubmit : msg -> Html msg
+hiddenSubmit msg =
+ button
+ [ style [ ("display", "none") ]
+ , onClick msg
+ ]
+ []