comparison lib/ur/basis.urs @ 2077:3cd2bd4b1de0

More simple textual HTML5 input types
author Adam Chlipala <adam@chlipala.net>
date Sun, 16 Nov 2014 14:16:11 -0500
parents 855d7746a084
children 6d126af2e1cb
comparison
equal deleted inserted replaced
2076:855d7746a084 2077:3cd2bd4b1de0
954 954
955 val hidden : formTag string [] [Data = data_attr, Id = string, Value = string] 955 val hidden : formTag string [] [Data = data_attr, Id = string, Value = string]
956 val textbox : formTag string [] ([Value = string, Size = int, Placeholder = string, Source = source string, Onchange = transaction unit, 956 val textbox : formTag string [] ([Value = string, Size = int, Placeholder = string, Source = source string, Onchange = transaction unit,
957 Ontext = transaction unit] ++ boxAttrs ++ inputAttrs) 957 Ontext = transaction unit] ++ boxAttrs ++ inputAttrs)
958 val password : formTag string [] ([Value = string, Size = int, Placeholder = string, Onchange = transaction unit] ++ boxAttrs ++ inputAttrs) 958 val password : formTag string [] ([Value = string, Size = int, Placeholder = string, Onchange = transaction unit] ++ boxAttrs ++ inputAttrs)
959 val email : formTag string [] ([Value = string, Size = int, Placeholder = string, Onchange = transaction unit] ++ boxAttrs ++ inputAttrs)
960 val textarea : formTag string [] ([Rows = int, Cols = int, Onchange = transaction unit, 959 val textarea : formTag string [] ([Rows = int, Cols = int, Onchange = transaction unit,
961 Ontext = transaction unit] ++ boxAttrs ++ inputAttrs) 960 Ontext = transaction unit] ++ boxAttrs ++ inputAttrs)
962 961
963 val checkbox : formTag bool [] ([Checked = bool, Onchange = transaction unit] ++ boxAttrs) 962 val checkbox : formTag bool [] ([Checked = bool, Onchange = transaction unit] ++ boxAttrs)
963
964 (* HTML5 widgets galore! *)
965
966 type textWidget = formTag string [] ([Value = string, Size = int, Placeholder = string, Onchange = transaction unit] ++ boxAttrs ++ inputAttrs)
967
968 val email : textWidget
969 val search : textWidget
970 val url_ : textWidget
971 val tel : textWidget
972
964 973
965 type file 974 type file
966 val fileName : file -> option string 975 val fileName : file -> option string
967 val fileMimeType : file -> string 976 val fileMimeType : file -> string
968 val fileData : file -> blob 977 val fileData : file -> blob