| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | Copyright CiviCRM LLC. All rights reserved. | |
| 4 | | | |
| 5 | | This work is published under the GNU AGPLv3 license with some | |
| 6 | | permitted exceptions and without any warranty. For full license | |
| 7 | | and copyright information, see https://civicrm.org/licensing | |
| 8 | +--------------------------------------------------------------------+ |
| 9 | *} |
| 10 | {literal} |
| 11 | <script type="text/javascript"> |
| 12 | CRM.$(function($) { |
| 13 | $("#{/literal}{$relativeName}{literal}").change(function() { |
| 14 | var n = cj(this).parent().parent(); |
| 15 | if ($(this).val() == "0") { |
| 16 | $(".crm-absolute-date-range", n).show(); |
| 17 | } else { |
| 18 | $(".crm-absolute-date-range", n).hide(); |
| 19 | $(':text', n).val(''); |
| 20 | } |
| 21 | }).change(); |
| 22 | }); |
| 23 | </script> |
| 24 | {/literal} |