From: Coleman Watts Date: Tue, 13 Jan 2015 18:01:42 +0000 (-0500) Subject: CRM-15742 - Prevent dialog from returning to an invalid state X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5fffbbe48fb9b1e134fd4cd31f6d57065e278529;p=civicrm-core.git CRM-15742 - Prevent dialog from returning to an invalid state --- diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 0743d99aa0..3ee5394097 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -373,7 +373,7 @@ validate: true, refreshAction: ['next_new', 'submit_savenext', 'upload_new'], cancelButton: '.cancel', - openInline: 'a.open-inline, a.button, a.action-item', + openInline: 'a.open-inline, a.button, a.action-item, a.open-inline-noreturn', onCancel: function(event) {} } }; @@ -487,6 +487,10 @@ if (settings.openInline) { settings.autoClose = $el.crmSnippet('isOriginalUrl'); $(settings.openInline, this).not(exclude + ', .crm-popup').click(function(event) { + if ($(this).hasClass('open-inline-noreturn')) { + // Force reset of original url + $el.data('civiCrmSnippet')._originalUrl = $(this).attr('href'); + } $el.crmSnippet('option', 'url', $(this).attr('href')).crmSnippet('refresh'); return false; }); diff --git a/templates/CRM/Contribute/Form/AdditionalPayment.tpl b/templates/CRM/Contribute/Form/AdditionalPayment.tpl index 8504a1c902..ca4d8e9761 100644 --- a/templates/CRM/Contribute/Form/AdditionalPayment.tpl +++ b/templates/CRM/Contribute/Form/AdditionalPayment.tpl @@ -79,7 +79,7 @@ {/if} {if $paymentType eq 'owed'} {/if} {/if} diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index 7c9cec2248..9ce7f2cca9 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -68,7 +68,7 @@ {else} {capture assign=ccModeLink}{crmURL p='civicrm/contact/view/contribution' q="reset=1&action=add&context=standalone&mode=live"}{/capture} {/if} - » {ts}submit credit card contribution{/ts} + » {ts}submit credit card contribution{/ts} {/if}
diff --git a/templates/CRM/Pledge/Page/Payment.tpl b/templates/CRM/Pledge/Page/Payment.tpl index 307d0f04a0..29476c3fea 100644 --- a/templates/CRM/Pledge/Page/Payment.tpl +++ b/templates/CRM/Pledge/Page/Payment.tpl @@ -55,10 +55,10 @@ {ts}View Payment{/ts} {else} {* Links to record / submit a payment. *} {capture assign=newContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&context=`$context`&ppid=`$row.id`"}{/capture} - {ts}Record Payment{/ts} + {ts}Record Payment{/ts} {if $newCredit} {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&ppid=`$row.id`&context=`$context`&mode=live"}{/capture} - {ts}Credit Card Payment{/ts} + {ts}Credit Card Payment{/ts} {/if} {capture assign=editURL}{crmURL p="civicrm/pledge/payment" q="reset=1&action=update&cid=`$contactId`&context=`$context`&ppId=`$row.id`"}{/capture} {ts}Edit Scheduled Payment{/ts}