X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=templates%2FCRM%2FCustom%2FForm%2FField.tpl;h=c80a0d2094ad16f0ee3d9645835d1343b0a7d06d;hb=f299f7db79fed6f3598c84302966bda087e7cac3;hp=32723fd6b3692d612baa92c5503d687cf3658d4a;hpb=175d24cec1ded3c7685caef93bfe5ef08798b66b;p=civicrm-core.git diff --git a/templates/CRM/Custom/Form/Field.tpl b/templates/CRM/Custom/Form/Field.tpl index 32723fd6b3..c80a0d2094 100644 --- a/templates/CRM/Custom/Form/Field.tpl +++ b/templates/CRM/Custom/Form/Field.tpl @@ -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. | | | @@ -190,7 +190,7 @@ 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 { @@ -200,8 +200,6 @@ $("#searchByRange", $form).hide(); } } - $('#is_searchable, [name^="data_type"]', $form).change(showSearchRange); - showSearchRange(); function toggleContactRefFilter(e) { var setSelected = $(this).attr('href'); @@ -284,6 +282,8 @@ $('[name^="data_type"]', $form).change(customOptionHtmlType); customOptionHtmlType(); + $('#is_searchable, [name^="data_type"]', $form).change(showSearchRange); + showSearchRange(); }); {/literal}