CRM-13966 - Convert adv search crmasmselect to select2
[civicrm-core.git] / templates / CRM / Contact / Form / Search / Custom.tpl
index 8c03008a2b3c9b86b99e46dfba71b219504297e3..86fe27f4e2fbdd7eab4c6e20ecf9579eb2508b1e 100644 (file)
         </table>
         {/strip}
 
-        <script type="text/javascript">
-        {* this function is called to change the color of selected row(s) *}
-        var fname = "{$form.formName}";
-        on_load_init_checkboxes(fname);
-        </script>
-
         {include file="CRM/common/pager.tpl" location="bottom"}
 
         </p>
@@ -171,13 +165,12 @@ function toggleContactSelection( name, qfKey, selection ){
     cj.post( Url, {  qfKey: qfKey , variableType: 'multiple' , action: 'unselect' } );
     {/literal}
     {foreach from=$rows item=row}{literal}
-      cj("#{/literal}{$row.checkbox}{literal}").removeAttr('checked');{/literal}
+      cj("#{/literal}{$row.checkbox}{literal}").prop('checked', false);{/literal}
     {/foreach}
     {literal}
-    cj("#toggleSelect").removeAttr('checked');
-    var formName = "{/literal}{$form.formName}{literal}";
-    on_load_init_checkboxes(formName);
+    cj("#toggleSelect").prop('checked', false);
   }
+  return false;
 }
 </script>