From ac53fdfddd1c608ac22ddef51133ef3ca66d1e9b Mon Sep 17 00:00:00 2001 From: Julien Verneuil Date: Fri, 15 Apr 2016 10:50:01 +0200 Subject: [PATCH] add "show_id" data attribute to all selected "hide_show" widgets like the selector_hide_show (checkbox and radio_button) --- 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 baf1acf..d7d1702 100644 --- a/web/CXM_form.anubis +++ b/web/CXM_form.anubis @@ -481,7 +481,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([class("in"), event(onclick, "checked_hide_show_element('"+div_id+"', this);")], label, htmlId(""), 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, htmlId(""), 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))) ]), @@ -491,7 +491,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"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);")], label, htmlId(""), 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, htmlId(""), 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