diff --git a/calexium_lib/web/CXM_dojo.anubis b/calexium_lib/web/CXM_dojo.anubis index cce479c..4931a39 100644 --- a/calexium_lib/web/CXM_dojo.anubis +++ b/calexium_lib/web/CXM_dojo.anubis @@ -73,9 +73,10 @@ public type Input_Type: password. public type InputDial: - input_dial(String id, Input_Type input_type, String label, Maybe(String) class), - input_date(String id, String label), - input_combo(String label, HtmlId id, WebArgName name, List((WebArgValue,String)) list_data). + input_dial(HtmlId id, Input_Type input_type, String label, Maybe(String) class), + input_date(HtmlId id, String label), + input_combo(HtmlId id, String label, List((WebArgValue,String)) list_data), + input_check(HtmlId id, String label, Bool checked). define List(HTML_Off_Form) @@ -111,20 +112,45 @@ public define HTML_Off_Form ]). define HTML_Off_Form + _maybe_label + ( + String label_text, + HtmlId html_id + ) = + if length(label_text) > 0 then literal("") + else literal(""). + +public define HTML_Off_Form + dojo_checkbox + ( + WebArgName the_name, + HtmlId the_id, + String label, + WebArgValue val, + Bool checked, + )= + sequence([ + _maybe_label(label, the_id), + literal(""), + ]). + + +define HTML_Off_Form input_in_dialog ( InputDial input_data )= if input_data is { - input_dial(id, input, label, class) then + input_dial(html_id, input, label, class) then sequence([ - literal("
") + " name=\""+html_id.id+"\" id=\""+html_id.id+"\" />") ]), - input_date(id, label) then + + input_date(html_id, label) then sequence([ - literal("