From 8b3bd42a37a90ba0975526566c049d7637705ba9 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Thu, 26 Oct 2023 14:05:13 +1300 Subject: [PATCH] Add preview for text entry, multi-line support. --- src/Text/HTML/Form.hs | 2 +- tpl/latin1-accent-lower.html | 3 +++ tpl/latin1-accent.html | 3 +++ tpl/latin1-symbol.html | 3 +++ tpl/latin1-upper.html | 3 +++ tpl/latin1.html | 3 +++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Text/HTML/Form.hs b/src/Text/HTML/Form.hs index 54ea053..59634a3 100644 --- a/src/Text/HTML/Form.hs +++ b/src/Text/HTML/Form.hs @@ -223,7 +223,7 @@ parseInput el | _:_ <- laxElement "input" el = Just Input { }, checked = False, - multiple = False, + multiple = True, formAction = Nothing, formEnctype = Nothing, formMethod = Nothing, diff --git a/tpl/latin1-accent-lower.html b/tpl/latin1-accent-lower.html index 9d98214..6587c05 100644 --- a/tpl/latin1-accent-lower.html +++ b/tpl/latin1-accent-lower.html @@ -1,6 +1,9 @@ {% extends "base.html" %} {%- block control -%}
+

{{ input.value }} + {% if input.multiple %}{% endif %}

+

abc | ABC | !@# | àêï | ÀÊÏ

diff --git a/tpl/latin1-accent.html b/tpl/latin1-accent.html index 65e2ed7..40a52c5 100644 --- a/tpl/latin1-accent.html +++ b/tpl/latin1-accent.html @@ -1,6 +1,9 @@ {% extends "base.html" %} {%- block control -%}
+

{{ input.value }} + {% if input.multiple %}{% endif %}

+

abc | ABC | !@# | àêï | diff --git a/tpl/latin1-symbol.html b/tpl/latin1-symbol.html index ec0da51..73e59a7 100644 --- a/tpl/latin1-symbol.html +++ b/tpl/latin1-symbol.html @@ -1,6 +1,9 @@ {% extends "base.html" %} {%- block control -%}

+

{{ input.value }} + {% if input.multiple %}{% endif %}

+

abc | ABC | !@# | àêï | ÀÊÏ

diff --git a/tpl/latin1-upper.html b/tpl/latin1-upper.html index 7c7da7d..e59df3f 100644 --- a/tpl/latin1-upper.html +++ b/tpl/latin1-upper.html @@ -1,6 +1,9 @@ {% extends "base.html" %} {%- block control -%}
+

{{ input.value }} + {% if input.multiple %}{% endif %}

+

abc | ABC | !@# | àêï | diff --git a/tpl/latin1.html b/tpl/latin1.html index be0061b..a68afed 100644 --- a/tpl/latin1.html +++ b/tpl/latin1.html @@ -1,6 +1,9 @@ {% extends "base.html" %} {%- block control -%}

+

{{ input.value }} + {% if input.multiple %}{% endif %}

+

abc | ABC | !@# | àêï | -- 2.30.2