boolean widgets in the SQLFORM.grid search widget should be "off" if unchecked.

This commit is contained in:
Tim Richardson
2014-11-24 23:34:00 +11:00
parent 64e90a7250
commit a82d3f88b6
+9 -1
View File
@@ -1878,7 +1878,15 @@ class SQLFORM(FORM):
function %(prefix)s_build_query(aggregator,a) {
var b=a.replace('.','-');
var option = jQuery('#%(field_id)s_'+b+' select').val();
var value = jQuery('#%(value_id)s_'+b).val().replace('"','\\\\"');
var value;
var $value_item = jQuery('#%(value_id)s_'+b);
if ($value_item.is(':checkbox')){
if ($value_item.is(':checked'))
value = "on";
else value = 'off';
}
else
{ value = $value_item.val().replace('"','\\\\"')}
var s=a+' '+option+' "'+value+'"';
var k=jQuery('#%(keywords_id)s');
var v=k.val();