Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
4 | +--------------------------------------------------------------------+ |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
6 | +--------------------------------------------------------------------+ | |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
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. | | |
12 | | | | |
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. | | |
17 | | | | |
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 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | <div id="priceset" class="crm-section price_set-section"> | |
27 | {if $priceSet.help_pre} | |
28 | <div class="messages help">{$priceSet.help_pre}</div> | |
29 | {/if} | |
30 | ||
31 | {foreach from=$priceSet.fields item=element key=field_id} | |
32 | {* Skip 'Admin' visibility price fields since this tpl is used in online registration. *} | |
38b5d31d | 33 | {if $element.visibility EQ 'public' || $context eq 'standalone' || $context eq 'advanced' || $context eq 'search' || $context eq 'participant' || $context eq 'dashboard' || $action eq 1024} |
6a488035 TO |
34 | <div class="crm-section {$element.name}-section"> |
35 | {if ($element.html_type eq 'CheckBox' || $element.html_type == 'Radio') && $element.options_per_line} | |
36 | {assign var="element_name" value="price_"|cat:$field_id} | |
5778c444 | 37 | <div class="label">{$form.$element_name.label}</div> |
6a488035 TO |
38 | <div class="content {$element.name}-content"> |
39 | {assign var="rowCount" value="1"} | |
40 | {assign var="count" value="1"} | |
41 | {foreach name=outer key=key item=item from=$form.$element_name} | |
42 | {if is_numeric($key) } | |
43 | {if $count == 1}<div class="price-set-row {$element.name}-row{$rowCount}">{/if} | |
44 | <span class="price-set-option-content">{$form.$element_name.$key.html}</span> | |
45 | {if $count == $element.options_per_line} | |
46 | </div> | |
47 | {assign var="rowCount" value=`$rowCount+1`} | |
48 | {assign var="count" value="1"} | |
49 | {else} | |
50 | {assign var="count" value=`$count+1`} | |
51 | {/if} | |
52 | {/if} | |
53 | {/foreach} | |
54 | {if $element.help_post} | |
55 | <div class="description">{$element.help_post}</div> | |
56 | {/if} | |
57 | </div> | |
58 | <div class="clear"></div> | |
59 | ||
60 | {else} | |
61 | ||
62 | {assign var="element_name" value="price_"|cat:$field_id} | |
63 | ||
64 | <div class="label">{$form.$element_name.label}</div> | |
65 | <div class="content {$element.name}-content">{$form.$element_name.html} | |
66 | {if $element.is_display_amounts && $element.html_type eq 'Text'} | |
67 | <span class="price-field-amount"> | |
68 | x {foreach item=option from=$element.options}{$option.amount|crmMoney}{/foreach} | |
69 | </span> | |
70 | {/if} | |
71 | {if $element.help_post}<br /><span class="description">{$element.help_post}</span>{/if} | |
72 | </div> | |
73 | <div class="clear"></div> | |
74 | ||
75 | {/if} | |
76 | </div> | |
77 | {/if} | |
78 | {/foreach} | |
79 | ||
80 | {if $priceSet.help_post} | |
81 | <div class="messages help">{$priceSet.help_post}</div> | |
82 | {/if} | |
83 | ||
84 | {* Include the total calculation widget if this is NOT a quickconfig event/contribution page. *} | |
85 | {if !$quickConfig} | |
86 | {include file="CRM/Price/Form/Calculate.tpl"} | |
87 | {/if} | |
88 | ||
89 | </div> |