Commit f22102f85d5212fe6133456d65ec6be48ae5ca3e

Authored by Julien Verneuil
1 parent df15cf4f

add automatically an id on "checkbox_hide_show" and "radio_button_hide_show" ele…

…ments to permit selecting by clicking on the label
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
web/CXM_form.anubis
@@ -488,7 +488,7 @@ public define HTML_In_Form @@ -488,7 +488,7 @@ public define HTML_In_Form
488 checkbox_hide_show(options, _label, wan, val, checked, fields) then 488 checkbox_hide_show(options, _label, wan, val, checked, fields) then
489 with div_id = generate_random_string(15), 489 with div_id = generate_random_string(15),
490 sequence([ 490 sequence([
491 - 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)), 491 + 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)),
492 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))) 492 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)))
493 ]), 493 ]),
494 494
@@ -498,7 +498,7 @@ public define HTML_In_Form @@ -498,7 +498,7 @@ public define HTML_In_Form
498 radio_button_hide_show(options, _label, wan, val, checked, fields) then 498 radio_button_hide_show(options, _label, wan, val, checked, fields) then
499 with div_id = generate_random_string(15), 499 with div_id = generate_random_string(15),
500 sequence([ 500 sequence([
501 - 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)), 501 + 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)),
502 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))) 502 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)))
503 ]), 503 ]),
504 504