From 152ff8b90314c943bea03ff087cb50e2ebc4a29c Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 13 May 2013 14:27:23 +1200 Subject: [PATCH] CRM-12595 fix formatting in templates files (P) --- templates/CRM/Price/Form/LineItem.tpl | 116 +++++++++--------- templates/CRM/Price/Form/Option.tpl | 16 +-- templates/CRM/Price/Form/OptionFields.tpl | 22 ++-- templates/CRM/Price/Form/Set.tpl | 4 +- templates/CRM/Price/Page/LineItem.tpl | 28 ++--- templates/CRM/Price/Page/Option.tpl | 4 +- templates/CRM/Profile/Form/Dynamic.tpl | 2 +- .../Page/MultipleRecordFieldsListing.tpl | 20 +-- 8 files changed, 106 insertions(+), 106 deletions(-) diff --git a/templates/CRM/Price/Form/LineItem.tpl b/templates/CRM/Price/Form/LineItem.tpl index b7bf4ce8a2..50577bc2f1 100644 --- a/templates/CRM/Price/Form/LineItem.tpl +++ b/templates/CRM/Price/Form/LineItem.tpl @@ -30,82 +30,82 @@ {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *} {if $priceset GT 0}
{/if} {ts}Participant {$priceset+1}{/ts} {$part.$priceset.info} - {/if} + {/if} - - {if $context EQ "Membership"} - + + {if $context EQ "Membership"} + {else} - + - - - {if $context EQ "Contribution" && $action eq 2} - - - - {/if} - {/if} - - {if $pricesetFieldsCount} - {/if} + + + {if $context EQ "Contribution" && $action eq 2} + + + + {/if} + {/if} + + {if $pricesetFieldsCount} + {/if} {foreach from=$value item=line} - {if $context NEQ "Membership"} - + {if $context NEQ "Membership"} + - {/if} + {/if} - {if $pricesetFieldsCount} {/if} - {if $context EQ "Contribution" && $action eq 2} - - - - {/if} + {if $pricesetFieldsCount} {/if} + {if $context EQ "Contribution" && $action eq 2} + + + + {/if} {/foreach} - {if $context EQ "Contribution" && $action eq 2} + {if $context EQ "Contribution" && $action eq 2} - - - - - - + + + + + - - - - - + + + + + + {/if}
{ts}Item{/ts}{ts}Fee{/ts}{ts}Item{/ts}{ts}Fee{/ts}{ts}Qty{/ts}{ts}Qty{/ts} {ts}Unit Price{/ts}{ts}Total Price{/ts}{ts}Paid{/ts}{ts}Owing{/ts}{ts}Amount of
Current Payment {/ts}
{ts}Total Participants{/ts}{ts}Total Price{/ts}{ts}Paid{/ts}{ts}Owing{/ts}{ts}Amount of
Current Payment {/ts}
{ts}Total Participants{/ts}
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description}
{/if}
{$line.qty}{$line.qty} {$line.unit_price|crmMoney}{$line.line_total|crmMoney}{$line.participant_count}{$pricefildTotal.LineItems[$line.price_field_value_id]|crmMoney} - {assign var="fildTotal" value=$line.line_total-$pricefildTotal[$pricefildTotal.id][$line.price_field_value_id]} - {$fildTotal|crmMoney} - $ {$line.participant_count}{$pricefildTotal.LineItems[$line.price_field_value_id]|crmMoney} + {assign var="fildTotal" value=$line.line_total-$pricefildTotal[$pricefildTotal.id][$line.price_field_value_id]} + {$fildTotal|crmMoney} + $ 
- + {ts}Contribution Total{/ts}: {$totalAmount|crmMoney}{$pricefildTotal.total|crmMoney}{assign var="total" value= $totalAmount-$pricefildTotal.total}{$total|crmMoney}
+
{$totalAmount|crmMoney}{$pricefildTotal.total|crmMoney}{assign var="total" value= $totalAmount-$pricefildTotal.total}{$total|crmMoney}
{literal} {/literal} -
Unallocated Amount
{$total|crmMoney}
Unallocated Amount
{$total|crmMoney}
{/if} @@ -116,11 +116,11 @@ cj(document).ready(function(){ {if $context EQ "Contribution"} {ts}Contribution Total{/ts}: {elseif $context EQ "Event"} - {ts}Event Total{/ts}: - {elseif $context EQ "Membership"} - {ts}Membership Fee Total{/ts}: + {ts}Event Total{/ts}: + {elseif $context EQ "Membership"} + {ts}Membership Fee Total{/ts}: {else} - {ts}Total Amount{/ts}: + {ts}Total Amount{/ts}: {/if} {$totalAmount|crmMoney} @@ -130,19 +130,19 @@ cj(document).ready(function(){ {foreach from=$lineItem item=pcount} {if $pcount neq 'skip'} {assign var="lineItemCount" value=0} - + {foreach from=$pcount item=p_count} {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count} {/foreach} {if $lineItemCount < 1 } - {assign var="lineItemCount" value=1} + {assign var="lineItemCount" value=1} {/if} {assign var="totalcount" value=$totalcount+$lineItemCount} - {/if} + {/if} {/foreach} {$totalcount} {/if} - + {if $hookDiscount.message} diff --git a/templates/CRM/Price/Form/Option.tpl b/templates/CRM/Price/Form/Option.tpl index 8ab6dc1d1a..6733a8a9db 100644 --- a/templates/CRM/Price/Form/Option.tpl +++ b/templates/CRM/Price/Form/Option.tpl @@ -58,16 +58,16 @@ {$form.description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$sid}{/if}{$form.description.html} - + {$form.financial_type_id.label} - {if !$financialType } - {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture} - {ts 1=$ftUrl}There are no financial types configured with a linked 'Revenue Account of' account. Click here if you want to configure financial types for your site.{/ts} - {else} - {$form.financial_type_id.html} - {/if} - + {if !$financialType } + {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture} + {ts 1=$ftUrl}There are no financial types configured with a linked 'Revenue Account of' account. Click here if you want to configure financial types for your site.{/ts} + {else} + {$form.financial_type_id.html} + {/if} + {* fix for CRM-10241 *} {if $form.count.html} diff --git a/templates/CRM/Price/Form/OptionFields.tpl b/templates/CRM/Price/Form/OptionFields.tpl index 1231a6dabe..9a9e36a7bd 100644 --- a/templates/CRM/Price/Form/OptionFields.tpl +++ b/templates/CRM/Price/Form/OptionFields.tpl @@ -104,23 +104,23 @@ r.style.display = 'none'; } } - + cj('#optionField input').blur( function(){ var currentId = cj(this).attr('id'); var arrayID = currentId.split('_'); if ((arrayID[1] == 'label' || arrayID[1] == 'amount') && arrayID[2] > 1) { - var value = cj("#"+currentId).val(); - if (value.length != 0 && cj("#option_financial_type_id_"+arrayID[2]).val() =='') { - var currentFtid = "#option_financial_type_id_"+arrayID[2]; - var previousFtid = "#option_financial_type_id_"+ (arrayID[2]-1); - var financial_type = cj(previousFtid).val(); - cj(currentFtid).val(financial_type); - } - if (cj("#option_label_"+arrayID[2]).val().length == 0 && cj("#option_amount_"+arrayID[2]).val().length == 0) { + var value = cj("#"+currentId).val(); + if (value.length != 0 && cj("#option_financial_type_id_"+arrayID[2]).val() =='') { + var currentFtid = "#option_financial_type_id_"+arrayID[2]; + var previousFtid = "#option_financial_type_id_"+ (arrayID[2]-1); + var financial_type = cj(previousFtid).val(); + cj(currentFtid).val(financial_type); + } + if (cj("#option_label_"+arrayID[2]).val().length == 0 && cj("#option_amount_"+arrayID[2]).val().length == 0) { cj("#option_financial_type_id_"+arrayID[2]).val(''); - } + } } - + }); {/literal} diff --git a/templates/CRM/Price/Form/Set.tpl b/templates/CRM/Price/Form/Set.tpl index dc327c1c95..d227d66b13 100644 --- a/templates/CRM/Price/Form/Set.tpl +++ b/templates/CRM/Price/Form/Set.tpl @@ -52,8 +52,8 @@ {/if} - - {$form.financial_type_id.label} + + {$form.financial_type_id.label} {$form.financial_type_id.html}   diff --git a/templates/CRM/Price/Page/LineItem.tpl b/templates/CRM/Price/Page/LineItem.tpl index a5a99d40be..578480f449 100644 --- a/templates/CRM/Price/Page/LineItem.tpl +++ b/templates/CRM/Price/Page/LineItem.tpl @@ -35,27 +35,27 @@ {/if} - - {if $context EQ "Membership"} - + + {if $context EQ "Membership"} + {else} - + - - {/if} - - {if $pricesetFieldsCount} - {/if} + + {/if} + + {if $pricesetFieldsCount} + {/if} {foreach from=$value item=line} - {if $context NEQ "Membership"} - + {if $context NEQ "Membership"} + - {/if} + {/if} - {if $pricesetFieldsCount} {/if} + {if $pricesetFieldsCount} {/if} {/foreach}
{ts}Item{/ts}{ts}Fee{/ts}{ts}Item{/ts}{ts}Fee{/ts}{ts}Qty{/ts}{ts}Qty{/ts} {ts}Unit Price{/ts}{ts}Total Price{/ts}{ts}Total Participants{/ts}{ts}Total Price{/ts}{ts}Total Participants{/ts}
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description}
{/if}
{$line.qty}{$line.qty} {$line.unit_price|crmMoney}{$line.line_total|crmMoney}{$line.participant_count}{$line.participant_count}
@@ -112,7 +112,7 @@ cj(document).ready(function($) { var format = '{$config->moneyformat}'; var currency = '{$currency}'; var currencySymbol = '{$currencySymbol}'; - {literal} + {literal} // Todo: This function should be a utility function moneyFormat(amount) { amount = parseFloat(amount).toFixed(2); diff --git a/templates/CRM/Price/Page/Option.tpl b/templates/CRM/Price/Page/Option.tpl index 972835e7b7..83586cde78 100644 --- a/templates/CRM/Price/Page/Option.tpl +++ b/templates/CRM/Price/Page/Option.tpl @@ -58,7 +58,7 @@ {ts}Option Label{/ts} {ts}Option Amount{/ts} {ts}Default{/ts} - {ts}Financial Type{/ts} + {ts}Financial Type{/ts} {ts}Order{/ts} {ts}Enabled?{/ts} @@ -70,7 +70,7 @@ {$row.label} {$row.amount|crmMoney} {if $row.is_default}{ts}Default{/ts}{/if} - {$row.financial_type_id} + {$row.financial_type_id} {$row.weight} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$row.id} diff --git a/templates/CRM/Profile/Form/Dynamic.tpl b/templates/CRM/Profile/Form/Dynamic.tpl index f8d2638faf..e4578304ad 100644 --- a/templates/CRM/Profile/Form/Dynamic.tpl +++ b/templates/CRM/Profile/Form/Dynamic.tpl @@ -269,7 +269,7 @@ function proccessMultiRecordForm(formData, jqForm, options) { {if ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192)} {if $action eq 2 and $multiRecordFieldListing} - {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true} + {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true} {assign var=floatStyle value='float:right'} {/if}
diff --git a/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl b/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl index 2b567bffd5..5c3dd2f99f 100644 --- a/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl +++ b/templates/CRM/Profile/Page/MultipleRecordFieldsListing.tpl @@ -28,12 +28,12 @@ {if $records and $headers} {include file="CRM/common/jsortable.tpl"} - +
{strip} - + {foreach from=$headers key=recId item=head} @@ -41,8 +41,8 @@ - {foreach from=$records key=recId item=rows} - + {foreach from=$records key=recId item=rows} + {foreach from=$rows item=row} {foreach from=$row item=val key=ids} @@ -63,7 +63,7 @@ function formDialog(dataURL, dialogTitle){ cj.ajax({ url: dataURL, success: function( content ) { - cj('#profile-dialog').show( ).html( content ).dialog({ + cj('#profile-dialog').show( ).html( content ).dialog({ title: dialogTitle, modal: true, width: 680, @@ -71,14 +71,14 @@ function formDialog(dataURL, dialogTitle){ opacity: 0.5, background: "black" }, - + close: function(event, ui) { - cj('#profile-dialog').html(''); + cj('#profile-dialog').html(''); } }); - cj('.action-link').hide(); + cj('.action-link').hide(); cj('#profile-dialog #crm-profile-block .edit-value label').css('display', 'inline'); - }}); + }}); } cj('.action-item').each(function(){ @@ -88,7 +88,7 @@ cj('.action-item').each(function(){ cj(".action-item").click(function(){ dataURL = cj(this).attr('jshref'); - dialogTitle = cj(this).attr('title'); + dialogTitle = cj(this).attr('title'); formDialog(dataURL, dialogTitle); }); }); -- 2.25.1
{ts}{$head}{/ts}
{$val}