Commit 758138e4b6a0aa748af4f0faedf21c9039e33ab4

Authored by Steve MARECHAL
1 parent 9ebdcfa0

hidden use now maybe(WebArgName)

Showing 1 changed file with 15 additions and 4 deletions   Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
... ... @@ -1055,7 +1055,7 @@ public type HTML_In_Form:
1055 1055 check_box_r (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
1056 1056 div (List(CoreAttrs), HTML_In_Form content),
1057 1057 div_empty (List(CoreAttrs)),
1058   - hidden (HtmlId id, WebArgName name, InitialValue init).
  1058 + hidden (HtmlId id, Maybe(WebArgName) name, InitialValue init).
1059 1059  
1060 1060  
1061 1061 'HTML_In_Form' defines all the elements you may put within a form. We define a
... ... @@ -1198,8 +1198,14 @@ public define HTML_In_Form
1198 1198 = file_upload([], "", htmlId(""), name, width).
1199 1199  
1200 1200 public define HTML_In_Form
1201   - hidden (WebArgName name, InitialValue init)
1202   - = if name is wan(web_name) then
  1201 + hidden (Maybe(WebArgName) name, InitialValue init)
  1202 + = with web_name =
  1203 + if name is
  1204 + {
  1205 + failure then "",
  1206 + success(w_name) then
  1207 + if w_name is wan(the_w_name) then the_w_name
  1208 + },
1203 1209 hidden(htmlId(web_name), name, init).
1204 1210  
1205 1211 public type HTML_Body:...
... ... @@ -4018,7 +4024,12 @@ define Printable_tree
4018 4024 div_empty(options) then
4019 4025 format(cinfo,sn,ic_v,any_div_empty(options),format_element,is_https),
4020 4026 hidden(id, name, value) then
4021   - ["<input type=\"hidden\" id=\"",id,"\" name=\"",name,"\" value=\"",value,"\" />"],
  4027 + ["<input type=\"hidden\" id=\"",id,"\"",
  4028 + if name is
  4029 + {
  4030 + failure then [""],
  4031 + success(the_name) then [" name=\"",the_name,"\""]
  4032 + }, " value=\"",value,"\" />"],
4022 4033  
4023 4034 }.
4024 4035  
... ...