2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 <div id="priceset" class="crm-section price_set-section">
27 {if $priceSet.help_pre}
28 <div class="messages help">{$priceSet.help_pre}</div>
31 {assign var='adminFld' value=false}
32 {if call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCRM') }
33 {assign var='adminFld' value=true}
36 {foreach from=$priceSet.fields item=element key=field_id}
37 {* Skip 'Admin' visibility price fields WHEN this tpl is used in online registration unless user has administer CiviCRM permission. *}
38 {if $element.visibility EQ 'public' || ($element.visibility EQ 'admin' && $adminFld EQ true) || $context eq 'standalone' || $context eq 'advanced' || $context eq 'search' || $context eq 'participant' || $context eq 'dashboard' || $action eq 1024}
39 <div class="crm-section {$element.name}-section">
40 {if ($element.html_type eq 'CheckBox' || $element.html_type == 'Radio') && $element.options_per_line}
41 {assign var="element_name" value="price_"|cat:$field_id}
42 <div class="label">{$form.$element_name.label}</div>
43 <div class="content {$element.name}-content">
44 {assign var="rowCount" value="1"}
45 {assign var="count" value="1"}
46 {foreach name=outer key=key item=item from=$form.$element_name}
47 {if is_numeric($key) }
48 {if $count == 1}<div class="price-set-row {$element.name}-row{$rowCount}">{/if}
49 <span class="price-set-option-content">{$form.$element_name.$key.html}</span>
50 {if $count == $element.options_per_line}
52 {assign var="rowCount" value=`$rowCount+1`}
53 {assign var="count" value="1"}
55 {assign var="count" value=`$count+1`}
59 {if $element.help_post}
60 <div class="description">{$element.help_post}</div>
63 <div class="clear"></div>
67 {assign var="element_name" value="price_"|cat:$field_id}
69 <div class="label">{$form.$element_name.label}</div>
70 <div class="content {$element.name}-content">{$form.$element_name.html}
71 {if $element.is_display_amounts && $element.html_type eq 'Text'}
72 <span class="price-field-amount">
73 {foreach item=option from=$element.options}
74 {if ($option.tax_amount || $option.tax_amount == "0") && $displayOpt && $invoicing}
75 {assign var="amount" value=`$option.amount+$option.tax_amount`}
76 {if $displayOpt == 'Do_not_show'}
78 {elseif $displayOpt == 'Inclusive'}
80 <span class='crm-price-amount-label'> (includes {$taxTerm} of {$option.tax_amount|crmMoney})</span>
82 {$option.amount|crmMoney}
83 <span class='crm-price-amount-label'> + {$option.tax_amount|crmMoney} {$taxTerm}</span>
86 {$option.amount|crmMoney}
91 {if $element.help_post}<br /><span class="description">{$element.help_post}</span>{/if}
93 <div class="clear"></div>
100 {if $priceSet.help_post}
101 <div class="messages help">{$priceSet.help_post}</div>
104 {* Include the total calculation widget if this is NOT a quickconfig event/contribution page. *}
105 {if !$quickConfig and !$dontInclCal}
106 {include file="CRM/Price/Form/Calculate.tpl"}