From c75d15f95e568ad2ccb04ce933b1c2753803aa5c Mon Sep 17 00:00:00 2001 From: Steve MARECHAL Date: Fri, 24 Oct 2008 16:04:46 +0000 Subject: [PATCH] text_input and hidden use WebArgName and not Maybe(WebArgName) --- calexium_lib/web/CXM_making_a_web_site.anubis | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/calexium_lib/web/CXM_making_a_web_site.anubis b/calexium_lib/web/CXM_making_a_web_site.anubis index 1079b36..a68b81a 100644 --- a/calexium_lib/web/CXM_making_a_web_site.anubis +++ b/calexium_lib/web/CXM_making_a_web_site.anubis @@ -1037,7 +1037,7 @@ public type HTML_In_Form: foreign_link (List(Text_Option), String url, String name), private_download (String abs_path, String name, String extra_ext, Maybe((String,List((String,String)))) action), - text_input (List(InputAttrs), String label_text, HtmlId id, Maybe(WebArgName) name, InitialValue init, Int width), + text_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width), text_input_ro (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width), password_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width), text_area (List(TextAreaOption), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width, Int height), @@ -1055,7 +1055,7 @@ public type HTML_In_Form: check_box_r (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked), div (List(CoreAttrs), HTML_In_Form content), div_empty (List(CoreAttrs)), - hidden (HtmlId id, Maybe(WebArgName) name, InitialValue init). + hidden (HtmlId id, WebArgName name, InitialValue init). 'HTML_In_Form' defines all the elements you may put within a form. We define a @@ -1198,14 +1198,8 @@ public define HTML_In_Form = file_upload([], "", htmlId(""), name, width). public define HTML_In_Form - hidden (Maybe(WebArgName) name, InitialValue init) - = with web_name = - if name is - { - failure then "", - success(w_name) then - if w_name is wan(the_w_name) then the_w_name - }, + hidden (WebArgName name, InitialValue init) + = if name is wan(web_name) then hidden(htmlId(web_name), name, init). public type HTML_Body:... @@ -3976,13 +3970,7 @@ define Printable_tree format(cinfo,sn,ic_v,any_private_download(url,name,extra,action),format_element,is_https), text_input(options, label_text, id, name, i, w) then [ maybe_label(label_text, id), - ""], - + ""], text_input_ro(options, label_text, id, name,i,w) then [ maybe_label(label_text, id), ""], @@ -4024,12 +4012,7 @@ define Printable_tree div_empty(options) then format(cinfo,sn,ic_v,any_div_empty(options),format_element,is_https), hidden(id, name, value) then - [""], + [""], }. -- libgit2 0.21.4