From f22102f85d5212fe6133456d65ec6be48ae5ca3e Mon Sep 17 00:00:00 2001 From: Julien Verneuil Date: Tue, 26 Apr 2016 16:07:26 +0200 Subject: [PATCH] add automatically an id on "checkbox_hide_show" and "radio_button_hide_show" elements to permit selecting by clicking on the label --- web/CXM_form.anubis | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/CXM_form.anubis b/web/CXM_form.anubis index 8b40da5..8a0265b 100644 --- a/web/CXM_form.anubis +++ b/web/CXM_form.anubis @@ -488,7 +488,7 @@ public define HTML_In_Form checkbox_hide_show(options, _label, wan, val, checked, fields) then with div_id = generate_random_string(15), sequence([ - check_box([data("show_id", div_id), class("in"), class("cxm_checkbox_hide_show"), event(onclick, "checked_hide_show_element('"+div_id+"', this);")], _label, html_Id(""), wan, val, get_Bool(lwa, wan.name, checked)), + check_box([data("show_id", div_id), class("in"), class("cxm_checkbox_hide_show"), event(onclick, "checked_hide_show_element('"+div_id+"', this);")], _label, html_Id("checkbox_"+div_id), wan, val, get_Bool(lwa, wan.name, checked)), div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], format_CXM_Form_Field(ff2, lwa)),fields))) ]), @@ -498,7 +498,7 @@ public define HTML_In_Form radio_button_hide_show(options, _label, wan, val, checked, fields) then with div_id = generate_random_string(15), sequence([ - radio_button([data("show_id", div_id), class("in"), class("cxm_radio_hide_show"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);")], _label, html_Id(""), wan, val, get_Bool(lwa, wan.name, checked)), + radio_button([data("show_id", div_id), class("in"), class("cxm_radio_hide_show"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);")], _label, html_Id("radio_button_hide_show_"+div_id), wan, val, get_Bool(lwa, wan.name, checked)), div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], format_CXM_Form_Field(ff2, lwa)),fields))) ]), -- libgit2 0.21.4