Merge pull request #12583 from omarabuhussein/dev/core#288
[civicrm-core.git] / templates / CRM / Contribute / Form / ContributionPage / Settings.tpl
1
2 {*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 5 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2019 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26 *}
27 {crmRegion name="contribute-form-contributionpage-settings-main"}
28 <div class="help">
29 {if $action eq 0}
30 <p>{ts}This is the first step in creating a new online Contribution Page. You can create one or more different Contribution Pages for different purposes, audiences, campaigns, etc. Each page can have it's own introductory message, pre-configured contribution amounts, custom data collection fields, etc.{/ts}</p>
31 <p>{ts}In this step, you will configure the page title, financial type (donation, campaign contribution, etc.), goal amount, and introductory message. You will be able to go back and modify all aspects of this page at any time after completing the setup wizard.{/ts}</p>
32 {else}
33 {ts}Use this form to edit the page title, financial type (e.g. donation, campaign contribution, etc.), goal amount, introduction, and status (active/inactive) for this online contribution page.{/ts}
34 {/if}
35 </div>
36 <div class="crm-block crm-form-block crm-contribution-contributionpage-settings-form-block">
37
38 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
39 <table class="form-layout-compressed">
40 <tr class="crm-contribution-contributionpage-settings-form-block-title"><td class="label">{$form.title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='title' id=$contributionPageID}{/if}</td><td>{$form.title.html}<br/>
41 <span class="description">{ts}This title will be displayed at the top of the page.<br />Please use only alphanumeric, spaces, hyphens and dashes for Title.{/ts}</td>
42 </tr>
43 <tr class="crm-contribution-contributionpage-settings-form-block-financial_type_id"><td class="label">{$form.financial_type_id.label}</td><td>{$form.financial_type_id.html}<br />
44 <span class="description">{ts}Select the corresponding financial type for contributions made using this page.{/ts}</span> {help id="id-financial_type"}</td>
45 </tr>
46
47 {* CRM-7362 --add campaign to contribution page *}
48 {include file="CRM/Campaign/Form/addCampaignToComponent.tpl"
49 campaignTrClass="crm-contribution-contributionpage-settings-form-block-campaign_id"}
50
51 <tr class="crm-contribution-contributionpage-settings-form-block-is_organization"><td>&nbsp;</td><td>{$form.is_organization.html} {$form.is_organization.label} {help id="id-is_organization"}</td></tr>
52 <tr id="for_org_option" class="crm-contribution-form-block-is_organization">
53 <td>&nbsp;</td>
54 <td>
55 <table class="form-layout-compressed">
56 <tr class="crm-contribution-for_organization_help">
57 <td class="description" colspan="2">
58 {capture assign="profileURL"}{crmURL p='civicrm/admin/uf/group' q='reset=1'}{/capture}
59 {if $invalidProfiles}
60 {ts 1=$profileURL}You must <a href="%1">configure a valid organization profile</a> in order to allow individuals to contribute on behalf of an organization. Valid profiles include Contact and / or Organization fields, and may include Contribution and Membership fields.{/ts}
61 {else}
62 {ts 1=$profileURL}To change the organization data collected use the "On Behalf Of Organization" profile (<a href="%1">Administer > Customize Data and Screens > Profiles</a>).{/ts}
63 {/if}
64 </td>
65 </tr>
66 {if !$invalidProfiles}
67 <tr class="crm-contribution-onbehalf_profile_id">
68 <td class="label">{$form.onbehalf_profile_id.label}</td>
69 <td>{$form.onbehalf_profile_id.html}</td>
70 </tr>
71 {/if}
72 <tr id="for_org_text" class="crm-contribution-contributionpage-settings-form-block-for_organization">
73 <td class="label">{$form.for_organization.label}</td>
74 <td>{$form.for_organization.html}<br />
75 <span class="description">{ts}Text displayed next to the checkbox on the contribution form.{/ts}</span>
76 </td>
77 </tr>
78 <tr class="crm-contribution-contributionpage-settings-form-block-is_for_organization">
79 <td>&nbsp;</td>
80 <td>{$form.is_for_organization.html}<br />
81 <span class="description">{ts}Check 'Required' to force ALL users to contribute/signup on behalf of an organization.{/ts}</span>
82 </td>
83 </tr>
84 </table>
85 </td>
86 </tr>
87 <tr class="crm-contribution-contributionpage-settings-form-block-intro_text">
88 <td class ="label">{$form.intro_text.label}<br /> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='intro_text' id=$contributionPageID}{/if} {help id="id-intro_msg"}</td><td>{$form.intro_text.html}</td>
89 </tr>
90 <tr class="crm-contribution-contributionpage-settings-form-block-footer_text">
91 <td class ="label">{$form.footer_text.label}<br /> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='footer_text' id=$contributionPageID}{/if} {help id="id-footer_msg"}</td><td>{$form.footer_text.html}</td>
92 </tr>
93 <tr class="crm-contribution-contributionpage-settings-form-block-goal_amount">
94 <td class ="label">{$form.goal_amount.label}</td><td>{$form.goal_amount.html} {help id="id-goal_amount"}</td>
95 </tr>
96 <tr class="crm-contribution-contributionpage-settings-form-block-start_date">
97 <td class ="label">{$form.start_date.label} {help id="id-start_date"}</td>
98 <td>{$form.start_date.html}</td>
99 </tr>
100 <tr class="crm-contribution-contributionpage-settings-form-block-end_date">
101 <td class ="label">{$form.end_date.label}</td>
102 <td>{$form.end_date.html}</td>
103 </tr>
104 <tr class="crm-contribution-contributionpage-settings-form-block-honor_block_is_active">
105 <td>&nbsp;</td><td>{$form.honor_block_is_active.html}{$form.honor_block_is_active.label} {help id="id-honoree_section"}</td>
106 </tr>
107 </table>
108 <table class="form-layout-compressed" id="honor">
109 <tr class="crm-contribution-contributionpage-settings-form-block-honor_block_title">
110 <td class="label">
111 {$form.honor_block_title.label}
112 </td>
113 <td>
114 {$form.honor_block_title.html}<br />
115 <span class="description">{ts}Title for the Honoree section (e.g. &quot;Honoree Information&quot;).{/ts}</span>
116 </td>
117 </tr>
118 <tr class="crm-contribution-contributionpage-settings-form-block-honor_block_text">
119 <td class="label">
120 {crmAPI var='result' entity='OptionGroup' action='get' sequential=1 name='soft_credit_type'}
121 {$form.honor_block_text.label}
122 </td>
123 <td>
124 {$form.honor_block_text.html}<br />
125 <span class="description">{ts}Optional explanatory text for the Honoree section (displayed above the Honoree fields).{/ts}</span>
126 </td>
127 </tr>
128 <tr class="crm-contribution-contributionpage-settings-form-block-honor_soft_credit_types">
129 <td class="label">
130 {$form.soft_credit_types.label}
131 </td>
132 <td>
133 {$form.soft_credit_types.html}
134 </td>
135 </tr>
136 <tr class="crm-contribution-contributionpage-custom-form-block-custom_pre_id">
137 <td class="label">
138 {$form.honoree_profile.label}
139 </td>
140 <td class="html-adjust">
141 {$form.honoree_profile.html}
142 <span class="description">{ts}Profile to be included in the honoree section{/ts}</span>
143 </td>
144 </tr>
145 </table>
146 <table class="form-layout-compressed">
147 <tr class="crm-contribution-contributionpage-settings-form-block-is_confirm_enabled">
148 <td>&nbsp;</td>
149 <td>{$form.is_confirm_enabled.html} {$form.is_confirm_enabled.label}<br />
150 <span class="description">{ts}If you disable this contributions will be processed immediately after submitting the contribution form.{/ts}</span></td>
151 </tr>
152 <tr class="crm-contribution-contributionpage-settings-form-block-is_share">
153 <td>&nbsp;</td>
154 <td>{$form.is_share.html} {$form.is_share.label} {help id="id-is_share"}</td>
155 </tr>
156 <tr class="crm-contribution-contributionpage-settings-form-block-is_active"><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>{$form.is_active.html} {$form.is_active.label}<br />
157 {if $contributionPageID}
158 <span class="description">
159 {if $config->userSystem->is_drupal || $config->userFramework EQ 'WordPress'}
160 {ts}When your page is active, you can link people to the page by copying and pasting the following URL:{/ts}<br />
161 <strong>{crmURL a=1 fe=1 p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageID`"}</strong>
162 {elseif $config->userFramework EQ 'Joomla'}
163 {ts 1=$title}When your page is active, create front-end links to the contribution page using the Menu Manager. Select <strong>Administer CiviCRM &raquo; CiviContribute &raquo; Manage Contribution Pages</strong> and select <strong>%1</strong> for the contribution page.{/ts}
164 {/if}
165 </span>
166 {/if}
167 </td>
168 </tr>
169 </table>
170 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
171 </div>
172
173 {include file="CRM/common/showHideByFieldValue.tpl"
174 trigger_field_id ="is_organization"
175 trigger_value = 1
176 target_element_id ="for_org_text"
177 target_element_type ="table-row"
178 field_type ="radio"
179 invert = 0
180 }
181
182 {include file="CRM/common/showHideByFieldValue.tpl"
183 trigger_field_id ="is_organization"
184 trigger_value = 1
185 target_element_id ="for_org_option"
186 target_element_type ="table-row"
187 field_type ="radio"
188 invert = 0
189 }
190 <script type="text/javascript">
191 showHonor();
192 {literal}
193 function showHonor() {
194 var checkbox = document.getElementsByName("honor_block_is_active");
195 if (checkbox[0].checked) {
196 document.getElementById("honor").style.display = "block";
197 } else {
198 document.getElementById("honor").style.display = "none";
199 }
200 }
201 {/literal}
202 </script>
203 {/crmRegion}
204 {crmRegion name="contribute-form-contributionpage-settings-post"}
205 {/crmRegion}