<script type="text/javascript">
function verify( ) {
- var element = document.getElementsByName("is_acknowledge");
- if ( element[0].checked ) {
+ if (cj('#is_acknowledge').is(':checked')) {
var emailAddress = '{/literal}{$email}{literal}';
if ( !emailAddress ) {
var emailAddress = cj('#email-address').html();
}
- var message = '{/literal}{ts 1="'+emailAddress+'"}Click OK to save this Pledge record AND send an acknowledgment to %1 now{/ts}{literal}.';
+ var message = '{/literal}{ts escape="js" 1="'+emailAddress+'"}Click OK to save this Pledge record AND send an acknowledgment to %1 now{/ts}{literal}.';
if (!confirm( message) ) {
return false;
}
{* Build pledge payment details*}
{literal}
<script type="text/javascript">
-
- function buildPaymentDetails( pledgeId, contactId )
- {
- var dataUrl = {/literal}"{crmURL p='civicrm/pledge/payment' h=0 q="action=browse&snippet=4&context=`$context`&pledgeId="}"{literal} + pledgeId + '&cid=' + contactId;
- CRM.loadPage(dataUrl, {target: '#paymentDetails' + pledgeId});
- }
+ (function($) {
+ // FIXME global function
+ window.buildPaymentDetails = function(pledgeId, contactId) {
+ var dataUrl = {/literal}"{crmURL p='civicrm/pledge/payment' h=0 q="action=browse&snippet=4&context=`$context`&pledgeId="}"{literal} + pledgeId + '&cid=' + contactId;
+ $('#paymentDetails' + pledgeId).load(dataUrl, function() {
+ $(this).trigger('crmLoad');
+ });
+ };
+ })(CRM.$);
</script>
{/literal}