Option.tpl whitespace cleanup
[civicrm-core.git] / templates / CRM / Price / Form / Option.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
6a488035
TO
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{if $action eq 8}
27 <div class="messages status no-popup">
28 <div class="icon inform-icon"></div>
29 {ts}WARNING: Deleting this option will result in the loss of all data.{/ts} {ts}This action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
30
31 </div>
32 {/if}
33<h3>{if $action eq 8 }{ts}Delete Option{/ts}{elseif $action eq 1}{ts}New Option{/ts}{elseif $action eq 2}{ts}Edit Option{/ts}{/if}</h3>
34<div class="crm-form-block">
35 {if $action neq 8}
36 <table class="form-layout">
37 {if $showMember}
38 <tr class="crm-price-option-form-block-membership_type_id">
39 <td class="label">{$form.membership_type_id.label}</td>
40 <td>{$form.membership_type_id.html}
41 <br /> <span class="description">{ts}If a membership type is selected, a membership will be created or renewed when users select this option. Leave this blank if you are using this for non-membership options (e.g. magazine subscription).{/ts} {help id="id-member-price-options" file="CRM/Price/Page/Field.hlp"}</span></td>
42 </tr>
43 <tr class="crm-price-option-form-block-membership_num_terms">
44 <td class="label">{$form.membership_num_terms.label}</td>
45 <td>{$form.membership_num_terms.html}
46 <br /> <span class="description">{ts}You can set this to a number other than one to allow multiple membership terms.{/ts}</span></td>
47 </tr>
48 {/if}
49 <tr class="crm-price-option-form-block-label">
50 <td class="label">{$form.label.label}</td>
51 <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='label' id=$sid}{/if}{$form.label.html}</td>
52 </tr>
53 <tr class="crm-price-option-form-block-amount">
54 <td class="label">{$form.amount.label}</td>
55 <td>{$form.amount.html}</td>
56 </tr>
57 <tr class="crm-price-option-form-block-description">
58 <td class="label">{$form.description.label}</td>
59 <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$sid}{/if}{$form.description.html}</td>
60 </tr>
152ff8b9 61 <tr class="crm-price-option-form-block-financial-type">
6a488035
TO
62 <td class="label">{$form.financial_type_id.label}</td>
63 <td>
152ff8b9 64 {if !$financialType }
65 {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture}
66 {ts 1=$ftUrl}There are no financial types configured with a linked 'Revenue Account of' account. <a href='%1'>Click here</a> if you want to configure financial types for your site.{/ts}
67 {else}
68 {$form.financial_type_id.html}
69 {/if}
70 </td>
6a488035
TO
71 </tr>
72 {* fix for CRM-10241 *}
73 {if $form.count.html}
74 <tr class="crm-price-option-form-block-count">
75 <td class="label">{$form.count.label}</td>
76 <td>{$form.count.html} {help id="id-participant-count" file="CRM/Price/Page/Field.hlp"}</td>
77 </tr>
78 {* 2 line fix for CRM-10241 *}
79 {/if}
80 {if $form.max_value.html}
81 <tr class="crm-price-option-form-block-max_value">
82 <td class="label">{$form.max_value.label}</td>
83 <td>{$form.max_value.html} {help id="id-participant-max" file="CRM/Price/Page/Field.hlp"}</td>
84 </tr>
85 {* fix for CRM-10241 *}
86 {/if}
87 <tr class="crm-price-option-form-block-weight">
88 <td class="label">{$form.weight.label}</td>
89 <td>{$form.weight.html}</td>
90 </tr>
91 <tr class="crm-price-option-form-block-is_active">
92 <td class="label">{$form.is_active.label}</td>
93 <td>{$form.is_active.html}</td>
94 {if !$hideDefaultOption}
95 <tr class="crm-price-option-form-block-is_default">
96 <td class="label">{$form.is_default.label}</td>
97 <td>{$form.is_default.html}</td>
98 </tr>
99 {/if}
100 </table>
101 {/if}
102
103
104 <div id="crm-submit-buttons" class="form-item">
105 <table class="form-layout">
106 <tr>
107 <td>&nbsp;</td>
108 <td>{include file="CRM/common/formButtons.tpl"}</td>
109 </tr>
110 </table>
111 </div>
112
113</div>
114
115{literal}
116 <script type="text/javascript">
117
118 function calculateRowValues( ) {
119 var mtype = cj("#membership_type_id").val();
120 var postUrl = "{/literal}{crmURL p='civicrm/ajax/memType' h=0}{literal}";
121 cj.post( postUrl, {mtype: mtype}, function( data ) {
122 cj("#amount").val( data.total_amount );
123 cj("#label").val( data.name );
124
125 }, 'json');
126 }
127 {/literal}
128</script>
129