From 923cc0fcad46eae0a00f7d5c8ea39e627b1aaa57 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 31 Dec 2016 15:54:06 -0500 Subject: Use 'id' attribute for
--- lib/ur/basis.urs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/ur/basis.urs') diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 8b0d4faa..82d8f6e4 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -947,7 +947,8 @@ val img : bodyTag ([Alt = string, Src = url, Width = int, Height = int, val form : ctx ::: {Unit} -> bind ::: {Type} -> [[MakeForm, Form] ~ ctx] => - option css_class + option id + -> option css_class -> xml ([Form] ++ ctx) [] bind -> xml ([MakeForm] ++ ctx) [] [] -- cgit v1.2.3 From 4e1f94952d1f8b861e52decddcadbbdc4f83d32f Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 2 Jan 2017 11:04:34 -0500 Subject: Add 'placeholder' attribute for textareas --- lib/ur/basis.urs | 4 ++-- tests/textarea_placeholder.ur | 12 ++++++++++++ tests/textarea_placeholder.urs | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tests/textarea_placeholder.ur create mode 100644 tests/textarea_placeholder.urs (limited to 'lib/ur/basis.urs') diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 82d8f6e4..23896e27 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -982,7 +982,7 @@ val hidden : formTag string [] [Data = data_attr, Id = string, Value = string] val textbox : formTag string [] ([Value = string, Size = int, Placeholder = string, Source = source string, Onchange = transaction unit, Ontext = transaction unit] ++ boxAttrs ++ inputAttrs) val password : formTag string [] ([Value = string, Size = int, Placeholder = string, Onchange = transaction unit] ++ boxAttrs ++ inputAttrs) -val textarea : formTag string [] ([Rows = int, Cols = int, Onchange = transaction unit, +val textarea : formTag string [] ([Rows = int, Cols = int, Placeholder = string, Onchange = transaction unit, Ontext = transaction unit] ++ boxAttrs ++ inputAttrs) val checkbox : formTag bool [] ([Checked = bool, Onchange = transaction unit] ++ boxAttrs) @@ -1092,7 +1092,7 @@ val ccheckbox : cformTag ([Size = int, Source = source bool, Onchange = transact val cselect : cformTag ([Source = source string, Onchange = transaction unit] ++ boxAttrs) [Cselect] val coption : unit -> tag [Value = string, Selected = bool] [Cselect, Body] [] [] [] -val ctextarea : cformTag ([Rows = int, Cols = int, Source = source string, Onchange = transaction unit, +val ctextarea : cformTag ([Rows = int, Cols = int, Placeholder = string, Source = source string, Onchange = transaction unit, Ontext = transaction unit] ++ boxAttrs ++ inputAttrs) [] (*** Tables *) diff --git a/tests/textarea_placeholder.ur b/tests/textarea_placeholder.ur new file mode 100644 index 00000000..b328f838 --- /dev/null +++ b/tests/textarea_placeholder.ur @@ -0,0 +1,12 @@ +fun lame _ = return + +fun main () = + s <- source ""; + return + + + + + + + diff --git a/tests/textarea_placeholder.urs b/tests/textarea_placeholder.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/tests/textarea_placeholder.urs @@ -0,0 +1 @@ +val main : unit -> transaction page -- cgit v1.2.3