Update copyright date for 2020
[civicrm-core.git] / templates / CRM / Custom / Form / Field.tpl
index 32723fd6b3692d612baa92c5503d687cf3658d4a..c80a0d2094ad16f0ee3d9645835d1343b0a7d06d 100644 (file)
@@ -2,7 +2,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2020                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
       var htmlType = $("[name='data_type[1]']", $form).val(),
        dataType = dataTypes[$("[name='data_type[0]']", $form).val()];
 
-      if (((dataType === 'Int' || dataType === 'Float' || dataType === 'Money') && (htmlType === "Text")) || dataType === 'Date') {
+      if (dataType === 'Int' || dataType === 'Float' || dataType === 'Money' || dataType === 'Date') {
         if ($('#is_searchable', $form).is(':checked')) {
           $("#searchByRange", $form).show();
         } else {
         $("#searchByRange", $form).hide();
       }
     }
-    $('#is_searchable, [name^="data_type"]', $form).change(showSearchRange);
-    showSearchRange();
 
     function toggleContactRefFilter(e) {
       var setSelected = $(this).attr('href');
 
     $('[name^="data_type"]', $form).change(customOptionHtmlType);
     customOptionHtmlType();
+    $('#is_searchable, [name^="data_type"]', $form).change(showSearchRange);
+    showSearchRange();
   });
 </script>
 {/literal}