| 1 | {literal} |
| 2 | <script type="text/javascript"> |
| 3 | CRM.$(function($) { |
| 4 | if ($('#update_modified_date').length == 0) { |
| 5 | return; |
| 6 | } |
| 7 | $('<br>') |
| 8 | .appendTo($('#update_modified_date')); |
| 9 | $('<button>') |
| 10 | .text("{/literal}{ts}Save Anyway{/ts}{literal}") |
| 11 | .click(function() { |
| 12 | $('input[name="modified_date"]').val( |
| 13 | $('#update_modified_date').attr('data:latest_modified_date') |
| 14 | ); |
| 15 | $('.crm-form-block .crm-form-submit.default').first().click(); |
| 16 | return false; |
| 17 | }) |
| 18 | .appendTo($('#update_modified_date')) |
| 19 | ; |
| 20 | $('<button>') |
| 21 | .text("{/literal}{ts}Reload Page{/ts}{literal}") |
| 22 | .click(function() { |
| 23 | window.location.href = CRM.url('civicrm/contact/add', { |
| 24 | reset: 1, |
| 25 | action: 'update', |
| 26 | cid: {/literal}{$contactId}{literal} |
| 27 | }); |
| 28 | return false; |
| 29 | }) |
| 30 | .appendTo($('#update_modified_date')) |
| 31 | ; |
| 32 | }); |
| 33 | </script> |
| 34 | {/literal} |