Mercurial > urweb
comparison lib/ur/basis.urs @ 2075:fde864eacd47
Make 'required' and 'autofocus' attributes Boolean; add a syntax extension for parsing their usual HTML syntax
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 16 Nov 2014 14:02:17 -0500 |
parents | e48e09a1f583 |
children | 855d7746a084 |
comparison
equal
deleted
inserted
replaced
2074:e48e09a1f583 | 2075:fde864eacd47 |
---|---|
947 ctx ::: {Unit} | 947 ctx ::: {Unit} |
948 -> [[Form] ~ ctx] => | 948 -> [[Form] ~ ctx] => |
949 nm :: Name -> unit | 949 nm :: Name -> unit |
950 -> tag attrs ([Form] ++ ctx) inner [] [nm = ty] | 950 -> tag attrs ([Form] ++ ctx) inner [] [nm = ty] |
951 | 951 |
952 con inputAttrs = [Required = string, Autofocus = string] | 952 con inputAttrs = [Required = bool, Autofocus = bool] |
953 | 953 |
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) |