From 8dd8e407184422753f9d74c17dacf0d022ce0b8c Mon Sep 17 00:00:00 2001 From: "Sharique A. Farooqui" Date: Fri, 18 Nov 2016 01:56:03 +0530 Subject: [PATCH] CRM-19549 : New pledge data entry page shows hard coded $ for installments ---------------------------------------- * CRM-19549: New pledge data entry page shows hard coded $ for installments https://issues.civicrm.org/jira/browse/CRM-19549 --- templates/CRM/Pledge/Form/Pledge.tpl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Pledge/Form/Pledge.tpl b/templates/CRM/Pledge/Form/Pledge.tpl index 0e343ebaed..dd028858fc 100644 --- a/templates/CRM/Pledge/Form/Pledge.tpl +++ b/templates/CRM/Pledge/Form/Pledge.tpl @@ -70,7 +70,12 @@ {$form.installments.label} - {$form.installments.html} {ts}installments of{/ts} {if $action eq 1 or $isPending}{$form.eachPaymentAmount.html|crmMoney:$currency}{elseif $action eq 2 and !$isPending}{$eachPaymentAmount|crmMoney:$currency}{/if} {ts}every{/ts} {$form.frequency_interval.html} {$form.frequency_unit.html} + {$form.installments.html} {ts}installments of{/ts} + {if $action eq 1 or $isPending} + {$form.eachPaymentAmount.html|crmMoney:$currency} + {elseif $action eq 2 and !$isPending} + {$eachPaymentAmount|crmMoney:$currency} + {/if} {ts}every{/ts} {$form.frequency_interval.html} {$form.frequency_unit.html} {$form.frequency_day.label} {$form.frequency_day.html} {ts}day of the period{/ts}
@@ -144,6 +149,13 @@ // bind first click of accordion header to load crm-accordion-body with snippet // everything else taken care of by cj().crm-accordions() cj(document).ready( function() { + + cj('#currency').closest('tr').next('tr').find('.currency-symbol').text(cj('#currency option:selected').text()); + // if there are more than one currency enabled. + cj('#currency').change(function(){ + cj('#currency').closest('tr').next('tr').find('.currency-symbol').text(cj(this).find(':selected').text()); + } + ); cj('.crm-ajax-accordion .crm-accordion-header').one('click', function() { loadPanes(cj(this).attr('id')); }); -- 2.25.1