From 89a023757dc77e6c6b966fba38ac29389667415e Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 26 Dec 2015 11:20:57 +0100 Subject: [PATCH] rename some CXM_FormField to CXM_Form_Field remove the CXM_form_field.anubis because the content was already in CXM_form --- web/CXM_form.anubis | 70 +++++++++++++++++++++++++++++++++++----------------------------------- web/CXM_form_field.anubis | 695 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 files changed, 35 insertions(+), 730 deletions(-) delete mode 100644 web/CXM_form_field.anubis diff --git a/web/CXM_form.anubis b/web/CXM_form.anubis index 3e392fa..46a73b2 100644 --- a/web/CXM_form.anubis +++ b/web/CXM_form.anubis @@ -33,7 +33,7 @@ public type FormFieldWidth: public type CXM_FormTooltip: tooltip(String title, String content, Int width). -public type CXM_FormField: +public type CXM_Form_Field: no_field, // empty field //--- title field --------------------------------------------------------------------- @@ -130,7 +130,7 @@ public type CXM_FormField: WebArgName web_arg_name, WebArgValue web_arg_value, Bool checked, - List(CXM_FormField) fields), + List(CXM_Form_Field) fields), //--- radio-button field -------------------------------------------------------------- radio_button (List(InputAttrs) options, @@ -165,7 +165,7 @@ public type CXM_FormField: // //--- fields line --------------------------------------------------------------------- // fields_line (String tag, // List(FormField) fields), - one_line_fields (List(CXM_FormField) fields), + one_line_fields (List(CXM_Form_Field) fields), // // //--- preview field ------------------------------------------------------------------- @@ -185,7 +185,7 @@ public type CXM_FormField: HTML_In_Form input), div (List(CoreAttrs), HTML_In_Form content), partial (HTML_Partial_Content p_content), - input_with_help (CXM_FormField field, + input_with_help (CXM_Form_Field field, Maybe(String) help_title, String help_text, Int width), @@ -207,67 +207,67 @@ public type CXM_FormField: // ////////////////////////////////////////////// // Alternative constructors: -public define CXM_FormField +public define CXM_Form_Field input(WebArgName n, InitialValue init_value, Width width) = input([], "", htmlId(n.name), n, init_value, width, non_mandatory). -public define CXM_FormField +public define CXM_Form_Field input(String label, WebArgName n, InitialValue init_value, Width width) = input([], label, htmlId(n.name), n, init_value, width, non_mandatory). -public define CXM_FormField +public define CXM_Form_Field input(String label, WebArgName n, InitialValue init_value, Width width, Mandatory mand) = input([], label, htmlId(n.name), n, init_value, width, mand). -public define CXM_FormField +public define CXM_Form_Field input_readonly(String label, WebArgName n, InitialValue init_value, Width width) = input_readonly([], label, htmlId(n.name), n, init_value, width). -public define CXM_FormField +public define CXM_Form_Field password_input(String label, WebArgName n, InitialValue init_value, Width width, Mandatory mand) = password_input([], label, htmlId(n.name), n, init_value, width, mand). -public define CXM_FormField +public define CXM_Form_Field checkbox(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) = checkbox([], label, htmlId(n.name), n, value, checked, mand). -public define CXM_FormField +public define CXM_Form_Field checkboxr(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) = checkboxr([], label, htmlId(n.name), n, value, checked, mand). -public define CXM_FormField +public define CXM_Form_Field radio_button(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) = radio_button([], label, htmlId(n.name), n, value, checked, mand). -public define CXM_FormField +public define CXM_Form_Field radio_buttonr(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) = radio_buttonr([], label, htmlId(n.name), n, value, checked, mand). -public define CXM_FormField +public define CXM_Form_Field submit(String action_name, HtmlClass class, Maybe(String) label, String button_text, List((String,String)) extra_operands) = submit([], class, action_name, label, button_text, extra_operands). -public define CXM_FormField +public define CXM_Form_Field submit(String action_name, Maybe(String) label, String button_text, List((String,String)) extra_operands) = submit([], htmlClass(""), action_name, label, button_text, extra_operands). -public define CXM_FormField +public define CXM_Form_Field upload(String label, HtmlId id, WebArgName name, Width width) = upload([], label, id, name, width, non_mandatory). -public define CXM_FormField +public define CXM_Form_Field upload(String label, HtmlId id, WebArgName name, Width width, Mandatory mand) = upload([], label, id, name, width, mand). -public define CXM_FormField - input_with_help (CXM_FormField field, String help_text) +public define CXM_Form_Field + input_with_help (CXM_Form_Field field, String help_text) = input_with_help (field, failure, help_text, 250). -public define CXM_FormField - input_with_help (CXM_FormField field, String help_text, Int width) +public define CXM_Form_Field + input_with_help (CXM_Form_Field field, String help_text, Int width) = input_with_help (field, failure, help_text, width). -public define CXM_FormField +public define CXM_Form_Field ip_input ( String label, @@ -282,7 +282,7 @@ public define CXM_FormField ). -public define CXM_FormField +public define CXM_Form_Field partial_ip_input ( String label, @@ -297,7 +297,7 @@ public define CXM_FormField partial_ip_input(id, wan_prefix, ip_fixed_part, ip) ). -public define CXM_FormField +public define CXM_Form_Field hidden ( WebArgName web_arg_name, @@ -314,7 +314,7 @@ public define CXM_FormField public define HTML_In_Form cxm_format_form_field ( - CXM_FormField ff + CXM_Form_Field ff ) = with star = (Mandatory m) |-> (String) if m is @@ -406,7 +406,7 @@ public define HTML_In_Form with div_id = generate_random_string(15), sequence([ check_box([event(onclick, "checkbox_hide_show_element('"+div_id+"', this);")], label, htmlId(""), name, val, checked), - div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_FormField ff2) |-> div([class("form_field")], cxm_format_form_field(ff2)),fields))) + div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], cxm_format_form_field(ff2)),fields))) ]), radio_button(options, label, id, name, val, checked, mand) then @@ -432,7 +432,7 @@ public define HTML_In_Form ]), one_line_fields(fields) then table([nude],[row([], - map((CXM_FormField ff2) |-> cell([],cxm_format_form_field(ff2)),fields))]) + map((CXM_Form_Field ff2) |-> cell([],cxm_format_form_field(ff2)),fields))]) , upload(options, label, id, name, w, mand) then @@ -478,21 +478,21 @@ public define HTML_In_Form public define HTML_In_Form cxm_fieldset ( - List(CoreAttrs) options, - String legend, - List(CXM_FormField) fields + List(CoreAttrs) options, + String legend, + List(CXM_Form_Field)fields ) = sequence([ literal(""), literal(if length(legend) > 0 then "" + legend + "" else ""), - sequence( map((CXM_FormField ff) |-> div([class("form_field")], cxm_format_form_field(ff)), fields) ), + sequence( map((CXM_Form_Field ff) |-> div([class("form_field")], cxm_format_form_field(ff)), fields) ), literal("")]). public define HTML_In_Form cxm_fieldset ( HtmlId fieldSetId, - List(CXM_FormField) fields + List(CXM_Form_Field)fields ) = cxm_fieldset([id(fieldSetId.id), class("aligned")], "", fields). @@ -537,7 +537,7 @@ public define HTML_Off_Form String action_name, List((String,String)) extra_ops, - List(CXM_FormField) fields + List(CXM_Form_Field) fields ) = cxm_form(form_name, options, action_name, extra_ops, [ @@ -550,7 +550,7 @@ public define HTML_Off_Form String form_name, List(CoreAttrs) options, HtmlId fieldSetId, - List(CXM_FormField) fields + List(CXM_Form_Field) fields ) = cxm_form(form_name, options, [ @@ -570,7 +570,7 @@ public define HTML_Off_Form ( String form_name, HtmlId fieldSetId, - List(CXM_FormField) fields + List(CXM_Form_Field) fields ) = cxm_form(form_name, [], fieldSetId, fields). diff --git a/web/CXM_form_field.anubis b/web/CXM_form_field.anubis deleted file mode 100644 index 1b9a72e..0000000 --- a/web/CXM_form_field.anubis +++ /dev/null @@ -1,695 +0,0 @@ -/* - * Created by PyramIDE. - * User: totoro - * Date: 24/07/2007 - * Time: 21:09 - * - */ - -read tools/basis.anubis -read system/lists.anubis -read system/string.anubis -read system_colors/rgb.anubis - -read calexium_lib/web/CXM_making_a_web_site.anubis -read calexium_lib/web/CXM_multihost_http_server.anubis -read calexium_lib/web/CXM_dojo.anubis - - read app_constants.anubis - read app_version.anubis -read web_pages/common/language_management.anubis -read web_pages/common/web_widgets.anubis -read calexium_lib/web/widgets/css_helper.anubis -read tools/base_tools.anubis -read utils.anubis - read types/app_web_types.anubis - - define Text_Option - menu_state_to_class - ( - MenuState state - ) - = - if state is - { - none then class("item_normal"), - highlight then class("item_highlight"), - sub then class("subitem"), - sub_and_highlight then class("subitem_highlight"), - disabled then class("item_disabled") - }. - - public define HTML_Off_Form - menu_title - ( - String view_text - ) = - literal("

" + view_text + "

"). - - public define HTML_Off_Form - menu_entry - ( - String view_text, - String action, - MenuState state - )= - paragraph([id(action), menu_state_to_class(state)], - actioner( same, same, - link([], view_text), - action, - [])). - - public define HTML_Off_Form - menu_entry - ( - String view_text, - String action, - $T val, - $T wanted - )= - if val = wanted then - menu_entry(view_text, action, highlight) - else - menu_entry(view_text, action, none). - - public define HTML_Off_Form - sub_menu_entry - ( - String view_text, - String action, - $T val, - $T wanted - )= - if val = wanted then - menu_entry(view_text, action, sub_and_highlight) - else - menu_entry(view_text, action, sub). - - - public define HTML_Off_Form - step_title - ( - String view_text - ) = - literal("

" + view_text + "

"). - - public define HTML_Off_Form - step_entry - ( - String view_text, - String action, - $T val, - $T wanted, - List($T) stepsDone - )= - if contains(stepsDone, wanted) | val = wanted then - with state = if val = wanted then highlight - else none, - paragraph([id(action), menu_state_to_class(state)], - actioner( same, same, - link([], view_text), - action, - [])) - else - paragraph([id(action), class("item_disabled")], - literal(view_text)) - . - -public define HTML_In_Form - display_info_line - ( - String html_id, - String html_class, - String txt, - ) = - div([class(html_class)], literal(txt)). - -public define HTML_Off_Form - display_info_line - ( - String html_id, - String html_class, - String txt, - ) = - div([class(html_class)], literal(txt)). - -public define HTML_Off_Form - display_main_info_line - ( - String html_class, - String txt - ) = - display_info_line("informations", html_class, txt). - -// ************************************************************************************* -// *** Generic form -// ************************************************************************************* - -read calexium_lib/web/CXM_common.anubis - -public type Mandatory: // used to mark fields as mandatory. - mandatory, - non_mandatory. - -public type Width: - small, - narrow, - wide, - custom(Int). - -public type FormFieldWidth: - auto, - custom(Int). - -public type MF_FormTooltip: - tooltip(String title, String content, Int width). - -public type CXM_Form_Field: - no_field, // empty field - - //--- title field --------------------------------------------------------------------- - title (String text), -// title (Int text_size, -// String text), -// title_f (List(Text_Option) -> HTML_In_Form), - - //--- message field ------------------------------------------------------------------- - message (String text), - - //--- text input field ---------------------------------------------------------------- - input (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - InitialValue init_value, - Width width, - Mandatory mandatory), - input_readonly (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - InitialValue init_value, - Width width), - - //--- text area field ----------------------------------------------------------------- - text_area (List(TextAreaOption) options, - String label, - HtmlId id, - WebArgName web_arg_name, - InitialValue init_value, - Width width, - Int height, - Mandatory mandatory), - - //--- password input field ------------------------------------------------------------ - password_input (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - InitialValue init_value, - Width width, - Mandatory mandatory), - - //--- hidden field ------------------------------------------------------------ - hidden (HtmlId id, - WebArgName web_arg_name, - InitialValue init_value), - //--- explanation field --------------------------------------------------------------- - explain (String text), - - //--- selector field ------------------------------------------------------------------ - selector (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - Int size, - List(String) items, - Maybe(InitialValue) selected, - Mandatory mandatory), - selector_c (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - Int size, - List((List(CoreAttrs),WebArgValue,String)) items, - Maybe(InitialValue) selected, - Mandatory mandatory), - - - - //--- checkbox field ------------------------------------------------------------------ - checkbox (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - WebArgValue web_arg_value, - Bool checked, - Mandatory mandatory), - // the same one, but with the tag on the right of the checkbox - checkboxr (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - WebArgValue web_arg_value, - Bool checked, - Mandatory mandatory), - - //--- radio-button field -------------------------------------------------------------- - radio_button (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - WebArgValue web_arg_value, - Bool checked, - Mandatory mandatory), - // the same one, but with the tag on the right of the radio_button - radio_buttonr (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - WebArgValue web_arg_value, - Bool checked, - Mandatory mandatory), - - radio_button_list (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName web_arg_name, - List((WebArgValue, String)) web_arg_value, - Maybe(InitialValue) selected, - Mandatory mandatory, - Bool is_wide), - -// //--- fields table -------------------------------------------------------------------- -// fields_table (String tag, -// List(FormField) fields), -// -// //--- fields line --------------------------------------------------------------------- -// fields_line (String tag, -// List(FormField) fields), - one_line_fields (List(CXM_Form_Field) fields), - -// -// //--- preview field ------------------------------------------------------------------- -// preview (String html_text), - - //--- upload field ------------------------------------------------------------------- - upload (List(InputAttrs) options, - String label, - HtmlId id, - WebArgName name, - Width width, - Mandatory mandatory), - - raw_in_form (HTML_In_Form html), - raw_in_form (String label, - HtmlId id, - HTML_In_Form input), - div (List(CoreAttrs), HTML_In_Form content), - partial (HTML_Partial_Content p_content), - input_with_help (CXM_Form_Field field, - Maybe(String) help_title, - String help_text, - Int width), - - sub_fieldset (HTML_In_Form fieldset), - - blank_space, - blank_space (HtmlClass class), - - //--- submit button ------------------------------------------------------------------- - submit (List(CoreAttrs) options, - HtmlClass class, - String action_name, - Maybe(String) label, - String button_text, - List((String,String)) extra_operands), - empty. - -// ////////////////////////////////////////////// -// Alternative constructors: - -public define CXM_Form_Field - input(WebArgName n, InitialValue init_value, Width width) - = input([], "", htmlId(n.name), n, init_value, width, non_mandatory). - -public define CXM_Form_Field - input(String label, WebArgName n, InitialValue init_value, Width width) - = input([], label, htmlId(n.name), n, init_value, width, non_mandatory). - -public define CXM_Form_Field - input(String label, WebArgName n, InitialValue init_value, Width width, Mandatory mand) - = input([], label, htmlId(n.name), n, init_value, width, mand). - -public define CXM_Form_Field - input_readonly(String label, WebArgName n, InitialValue init_value, Width width) - = input_readonly([], label, htmlId(n.name), n, init_value, width). - -public define CXM_Form_Field - password_input(String label, WebArgName n, InitialValue init_value, Width width, Mandatory mand) - = password_input([], label, htmlId(n.name), n, init_value, width, mand). - -public define CXM_Form_Field - checkbox(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) - = checkbox([], label, htmlId(n.name), n, value, checked, mand). - -public define CXM_Form_Field - checkboxr(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) - = checkboxr([], label, htmlId(n.name), n, value, checked, mand). - -public define CXM_Form_Field - radio_button(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) - = radio_button([], label, htmlId(n.name), n, value, checked, mand). - -public define CXM_Form_Field - radio_buttonr(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand) - = radio_buttonr([], label, htmlId(n.name), n, value, checked, mand). - -public define CXM_Form_Field - submit(String action_name, HtmlClass class, Maybe(String) label, String button_text, List((String,String)) extra_operands) - = submit([], class, action_name, label, button_text, extra_operands). - -public define CXM_Form_Field - submit(String action_name, Maybe(String) label, String button_text, List((String,String)) extra_operands) - = submit([], htmlClass(""), action_name, label, button_text, extra_operands). - -public define CXM_Form_Field - upload(String label, HtmlId id, WebArgName name, Width width) - = upload([], label, id, name, width, non_mandatory). - -public define CXM_Form_Field - upload(String label, HtmlId id, WebArgName name, Width width, Mandatory mand) - = upload([], label, id, name, width, mand). - -public define CXM_Form_Field - input_with_help (CXM_Form_Field field, String help_text) - = input_with_help (field, failure, help_text, 250). - -public define CXM_Form_Field - input_with_help (CXM_Form_Field field, String help_text, Int width) - = input_with_help (field, failure, help_text, width). - -public define CXM_Form_Field - ip_input - ( - String label, - HtmlId id, - WebArgName wan_prefix, - String ip - )= - raw_in_form( - label, - id, - ip_input(id, wan_prefix, ip) - ). - - -public define CXM_Form_Field - partial_ip_input - ( - String label, - HtmlId id, - WebArgName wan_prefix, - List(String) ip_fixed_part, - String ip - )= - raw_in_form( - label, - id, - partial_ip_input(id, wan_prefix, ip_fixed_part, ip) - ). - -public define CXM_Form_Field - hidden - ( - WebArgName web_arg_name, - InitialValue init_value - )= - if web_arg_name is wan(name) then - hidden(htmlId(name), web_arg_name, init_value). - - - //--- explanation field --------------------- - -// ////////////////////////////////////////////////////////// - -public define HTML_In_Form - cxm_format_form_field - ( - CXM_Form_Field ff - ) = - with star = (Mandatory m) |-> (String) - if m is - { - mandatory then "*", - non_mandatory then "" - }, - pixels = (Width width) |-> - if width is - { - small then 10, - narrow then 50, - wide then 70, - custom(n) then n - }, - // special case out of the div("inputable") tag. -// if ff is submit(attrs, action_name, mb_label, button_text, extra_operands) then -// mf_format_form_field_inside_inputable(ff, star, pixels) -// else if ff is hidden(name, init) then -// mf_format_form_field_inside_inputable(ff, star, pixels) -// else if ff is sub_fieldset(fieldset) then -// mf_format_form_field_inside_inputable(ff, star, pixels) -// else -// div([class("inputable")], -// mf_format_form_field_inside_inputable(ff, star, pixels)) - -// sequence([ -// literal(" \n"), -// mf_format_form_field_inside_inputable(ff, star, pixels, failure), -// literal(" \n"), -// ]) - - if ff is - { - no_field then - literal(""), - - title(t) then - literal("

" + t + "

"), - -// title(s,t) then -// text([h_center, size(s),bold,color(rgb(0,0,0))], t), -// -// title_f(t) then -// t([h_center, size(16),bold,color(rgb(0,0,0))]), - - message(t) then - literal(t), - - input(options, label, id, name, init, w, mand) then - text_input([class("in") . options], label + star(mand), id, name, init, pixels(w)), - - input_readonly(options, label, id, name, init, w) then - text_input_ro([class("in") . options], label, id, name, init, pixels(w)), - - text_area(options, label, id, name, init, w, height, mand) then - text_area([input_attrs([class("in")]) . options], label + star(mand), id, name, init, pixels(w), height), - - password_input(options, label, id, name, init, w, mand) then - password_input([class("in") . options], label + star(mand), id, name, init, pixels(w)), - - hidden(id, name, init) then - hidden(id, name, init), - - explain(t) then - div([class("sub")], literal(t)), - - selector(options, label, id, wan, size, items, selected, mand) then - if selected is - { - failure then selector(options, label + star(mand), id, wan, size, items), - success(init) then selector(options, label + star(mand), id, wan, size, items, init), - }, - - selector_c(options, label, id, wan, size, items, selected, mand) then - if selected is - { - failure then selector_c(options, label + star(mand), id, wan, size, items), - success(init) then selector_c(options, label + star(mand), id, wan, size, items, init), - }, - - checkbox(options, label, id, name, val, checked, mand) then - check_box(options, label + star(mand), id, name, val, checked), - - checkboxr(options, label, id, name, val, checked, mand) then - check_box_r(options, label + star(mand), id, name, val, checked), - - radio_button(options, label, id, name, val, checked, mand) then - radio_button(options, label + star(mand), id, name, val, checked), - - radio_buttonr(options, label, id, name, val, checked, mand) then - radio_button_r(options, label + star(mand), id, name, val, checked), - - radio_button_list (options, label, id, wan, items, selected, mand, wide) then - sequence([ - literal(""), - div( [class("radiolist")], sequence( - with i = var((Int)-1), - itemclass = if wide then "radiolistitem_wide" else "radiolistitem", - map( ((WebArgValue, String) item) |-> - i <- *i + 1; - if item is (wav, item_label) then - with id = if id is htmlId(the_id) then htmlId(the_id + "_radio_" + *i), - div([class(itemclass)], radio_button_r(options, item_label, id, wan, wav, - if selected is success(v) then wav.value = v.value else false)), - items)) - ), - ]), - one_line_fields(fields) then - table([nude],[row([], - map((CXM_Form_Field ff2) |-> cell([],cxm_format_form_field(ff2)),fields))]) - , - - - upload(options, label, id, name, w, mand) then - file_upload(options, label + star(mand), id, name, pixels(w)), - - raw_in_form(html) then - html, -// div([class("in")], html), - raw_in_form(label, id, input) then - sequence([ - if id is htmlId(id) then - literal(""), - input]), - div(options, e) then div(options, e), - partial(p_content) then partial(p_content), - input_with_help(input, help_title, help_text, width) then - sequence([ - cxm_format_form_field(input), - html_tooltip(force_String(help_title), help_text, width), - ]), - - sub_fieldset(fieldset) then - fieldset, - - blank_space then - div([class("blank_space")], literal(" ")), - - blank_space(htmlClass) then - div([class(htmlClass.class)], literal(" ")), - - submit(attrs, htmlClass, action_name, mb_label, button_text, extra_operands) then - actioner( same, // TODO change this to allow external URL - if mb_label is - { - failure then same, - success(n) then same(n) - }, - submit(attrs + [class(htmlClass.class)], button_text), - action_name, - extra_operands - ), - empty then literal("") - }. - -public define HTML_In_Form - cxm_generic_fieldset - ( - List(CoreAttrs) options, - String legend, - List(CXM_Form_Field)fields - ) = - sequence([ - literal(""), - literal(if length(legend) > 0 then "" + legend + "" else ""), - sequence( map((CXM_Form_Field ff) |-> div([class("form_field")], cxm_format_form_field(ff)), fields) ), - literal("")]). - -public define HTML_In_Form - cxm_generic_fieldset - ( - HtmlId fieldSetId, - List(CXM_Form_Field)fields - ) = - cxm_generic_fieldset([id(fieldSetId.id), class("aligned")], "", fields). - -public define HTML_Off_Form - cxm_generic_form - ( - String form_name, - List(CoreAttrs) options, - String action_name, - List((String,String)) extra_ops, - List(HTML_In_Form) fieldSets - ) = - //div([class("formulaire")], - form( form_name, - [class("formulaire") . options], - action_name, - extra_ops, - sequence( fieldSets ) - // ) - ). - -public define HTML_Off_Form - cxm_generic_form - ( - String form_name, - List(CoreAttrs) options, - List(HTML_In_Form) fieldSets - ) = - //div([class("formulaire")], - form( form_name, - [class("formulaire") . options], - sequence( fieldSets ) - // ) - ). - -public define HTML_Off_Form - cxm_generic_form - ( - String form_name, - List(CoreAttrs) options, - HtmlId fieldSetId, - String action_name, - List((String,String)) extra_ops, - - List(CXM_Form_Field) fields - ) = - cxm_generic_form(form_name, options, action_name, extra_ops, - [ - cxm_generic_fieldset([id(fieldSetId.id), class("aligned")], "", fields) - ]). - -public define HTML_Off_Form - cxm_generic_form - ( - String form_name, - List(CoreAttrs) options, - HtmlId fieldSetId, - List(CXM_Form_Field) fields - ) = - cxm_generic_form(form_name, options, - [ - cxm_generic_fieldset([id(fieldSetId.id), class("aligned")], "", fields) - ]). - -public define HTML_Off_Form - cxm_generic_form - ( - String form_name, - List(HTML_In_Form) fieldSets - ) = - cxm_generic_form(form_name, [], fieldSets). - -public define HTML_Off_Form - cxm_generic_form - ( - String form_name, - HtmlId fieldSetId, - List(CXM_Form_Field) fields - ) = - cxm_generic_form(form_name, [], fieldSetId, fields). - - -- libgit2 0.21.4