summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/basis.urs30
-rw-r--r--src/monoize.sml8
-rw-r--r--src/urweb.grm4
-rw-r--r--tests/crud.ur8
4 files changed, 25 insertions, 25 deletions
diff --git a/lib/basis.urs b/lib/basis.urs
index c4524056..177554a9 100644
--- a/lib/basis.urs
+++ b/lib/basis.urs
@@ -283,14 +283,14 @@ con xhtml = xml [Html]
con page = xhtml [] []
con xbody = xml [Body] [] []
con xtr = xml [Body, Tr] [] []
-con xform = xml [Body, LForm] [] []
+con xform = xml [Body, Form] [] []
(*** HTML details *)
con html = [Html]
con head = [Head]
con body = [Body]
-con form = [Body, LForm]
+con form = [Body, Form]
con tabl = [Body, Table]
con tr = [Body, Tr]
@@ -319,34 +319,34 @@ val li : bodyTag []
val a : bodyTag [Link = transaction page]
-val lform : ctx ::: {Unit} -> bind ::: {Type}
+val form : ctx ::: {Unit} -> bind ::: {Type}
-> fn [[Body] ~ ctx] =>
xml form [] bind
-> xml ([Body] ++ ctx) [] []
-con lformTag = fn (ty :: Type) (inner :: {Unit}) (attrs :: {Type}) =>
+con formTag = fn (ty :: Type) (inner :: {Unit}) (attrs :: {Type}) =>
ctx ::: {Unit}
- -> fn [[LForm] ~ ctx] =>
+ -> fn [[Form] ~ ctx] =>
nm :: Name -> unit
- -> tag attrs ([LForm] ++ ctx) inner [] [nm = ty]
-val textbox : lformTag string [] [Value = string]
-val password : lformTag string [] []
-val ltextarea : lformTag string [] []
+ -> tag attrs ([Form] ++ ctx) inner [] [nm = ty]
+val textbox : formTag string [] [Value = string]
+val password : formTag string [] []
+val textarea : formTag string [] []
-val checkbox : lformTag bool [] [Checked = bool]
+val checkbox : formTag bool [] [Checked = bool]
con radio = [Body, Radio]
-val radio : lformTag string radio []
+val radio : formTag string radio []
val radioOption : unit -> tag [Value = string] radio [] [] []
con select = [Select]
-val lselect : lformTag string select []
-val loption : unit -> tag [Value = string] select [] [] []
+val select : formTag string select []
+val option : unit -> tag [Value = string] select [] [] []
val submit : ctx ::: {Unit} -> use ::: {Type}
- -> fn [[LForm] ~ ctx] =>
+ -> fn [[Form] ~ ctx] =>
unit
-> tag [Action = $use -> transaction page]
- ([LForm] ++ ctx) ([LForm] ++ ctx) use []
+ ([Form] ++ ctx) ([Form] ++ ctx) use []
(*** Tables *)
diff --git a/src/monoize.sml b/src/monoize.sml
index 9fc0458d..da7b9767 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -1361,7 +1361,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
| _ => (Print.prefaces "Targs" (map (fn t => ("T", CorePrint.p_con env t)) targs);
raise Fail "No name passed to textarea tag"))
| "password" => input "password"
- | "ltextarea" =>
+ | "textarea" =>
(case targs of
[_, (L.CName name, _)] =>
let
@@ -1393,7 +1393,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
normal ("input",
SOME (L'.EPrim (Prim.String (" type=\"radio\" name=\"" ^ name ^ "\"")), loc)))
- | "lselect" =>
+ | "select" =>
(case targs of
[_, (L.CName name, _)] =>
let
@@ -1411,14 +1411,14 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
| _ => (Print.prefaces "Targs" (map (fn t => ("T", CorePrint.p_con env t)) targs);
raise Fail "No name passed to lselect tag"))
- | "loption" => normal ("option", NONE)
+ | "option" => normal ("option", NONE)
| "tabl" => normal ("table", NONE)
| _ => normal (tag, NONE)
end
| L.EApp ((L.ECApp (
- (L.ECApp ((L.EFfi ("Basis", "lform"), _), _), _),
+ (L.ECApp ((L.EFfi ("Basis", "form"), _), _), _),
_), _),
xml) =>
let
diff --git a/src/urweb.grm b/src/urweb.grm
index 8d5f8bb7..3511093c 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -955,8 +955,8 @@ xmlOne : NOTAGS (EApp ((EVar (["Basis"], "cdata"), s (NO
val et = tagIn END_TAG
in
if #1 tag = et then
- if et = "lform" then
- (EApp ((EVar (["Basis"], "lform"), pos),
+ if et = "form" then
+ (EApp ((EVar (["Basis"], "form"), pos),
xml), pos)
else
(EApp (#2 tag, xml), pos)
diff --git a/tests/crud.ur b/tests/crud.ur
index 32233eb0..b22cb157 100644
--- a/tests/crud.ur
+++ b/tests/crud.ur
@@ -54,7 +54,7 @@ fun update (id : int) =
fso <- oneOrNoRows (SELECT tab.{{mapT2T fstTT M.cols}} FROM tab WHERE tab.Id = {id});
case fso : (Basis.option {Tab : $(mapT2T fstTT M.cols)}) of
None => return <xml><body>Not found!</body></xml>
- | Some fs => return <xml><body><lform>
+ | Some fs => return <xml><body><form>
{foldT2R2 [fstTT] [colMeta] [fn cols :: {(Type * Type)} => xml form [] (mapT2T sndTT cols)]
(fn (nm :: Name) (t :: (Type * Type)) (rest :: {(Type * Type)})
[[nm] ~ rest] (v : t.1) (col : colMeta t)
@@ -67,7 +67,7 @@ fun update (id : int) =
[M.cols] fs.Tab M.cols}
<submit action={save id}/>
- </lform></body></xml>
+ </form></body></xml>
fun delete (id : int) =
() <- dml (DELETE FROM tab WHERE Id = {id});
@@ -117,7 +117,7 @@ fun main () =
<br/>
- <lform>
+ <form>
{foldT2R [colMeta] [fn cols :: {(Type * Type)} => xml form [] (mapT2T sndTT cols)]
(fn (nm :: Name) (t :: (Type * Type)) (rest :: {(Type * Type)})
[[nm] ~ rest] (col : colMeta t) (acc : xml form [] (mapT2T sndTT rest)) => <xml>
@@ -128,7 +128,7 @@ fun main () =
[M.cols] M.cols}
<submit action={create}/>
- </lform>
+ </form>
</body></xml>
end