# HG changeset patch # User Adam Chlipala # Date 1216913521 14400 # Node ID 4334bb734187e70c1b42049331fe219f3bfc2840 # Parent e2b1853795928329ef5f03aa3b590d572c8bc4ad Password inputs diff -r e2b185379592 -r 4334bb734187 lib/basis.lig --- a/lib/basis.lig Thu Jul 24 11:16:54 2008 -0400 +++ b/lib/basis.lig Thu Jul 24 11:32:01 2008 -0400 @@ -66,6 +66,7 @@ -> nm :: Name -> unit -> tag attrs ([LForm] ++ ctx) inner [] [nm = ty] val textbox : lformTag string [] [] +val password : lformTag string [] [] val ltextarea : lformTag string [] [] con radio = [Body, Radio] diff -r e2b185379592 -r 4334bb734187 src/monoize.sml --- a/src/monoize.sml Thu Jul 24 11:16:54 2008 -0400 +++ b/src/monoize.sml Thu Jul 24 11:32:01 2008 -0400 @@ -259,7 +259,7 @@ fun input typ = case targs of - [(L.CName name, _)] => + [_, (L.CName name, _)] => (L'.EStrcat (tagStart "input", (L'.EPrim (Prim.String (" type=\"" ^ typ ^ "\" name=\"" ^ name ^ "\"/>")), loc)), loc) @@ -304,6 +304,7 @@ loc)), 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" => (case targs of [_, (L.CName name, _)] => diff -r e2b185379592 -r 4334bb734187 tests/pass.lac --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/pass.lac Thu Jul 24 11:32:01 2008 -0400 @@ -0,0 +1,13 @@ +val handler = fn r => +
  • Name: {cdata r.Nam}
  • +
  • Password: {cdata r.Word}
  • + + +val main : unit -> page = fn () => + + Name:
    + Password:
    + + +
    +