summaryrefslogtreecommitdiff
path: root/elm/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'elm/Lib')
-rw-r--r--elm/Lib/Html.elm6
1 files changed, 6 insertions, 0 deletions
diff --git a/elm/Lib/Html.elm b/elm/Lib/Html.elm
index 86c0f8f7..d75dced4 100644
--- a/elm/Lib/Html.elm
+++ b/elm/Lib/Html.elm
@@ -150,6 +150,12 @@ inputWikidata nam val onch =
[ pattern "^Q?[1-9][0-9]{0,8}$" ]
+-- Similar to inputCheck and inputRadio with a label, except this is just a link.
+linkRadio : Bool -> (Bool -> m) -> List (Html m) -> Html m
+linkRadio val onch content =
+ a [ href "#", onClickD (onch (not val)), class "linkradio", classList [("checked", val)] ] content
+
+
-- Generate a form field (table row) with a label. The `label` string can be:
--
-- "none" -> To generate a full-width field (colspan=2)