Merge pull request #8516 from mlutfy/master-crm18756-2
[civicrm-core.git] / templates / CRM / Campaign / Form / Petition.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
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
27 <div class="crm-block crm-form-block crm-campaign-survey-form-block">
28 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
29 {if $action eq 8}
30 <table class="form-layout">
31 <tr>
32 <td colspan="2">
33 <div class="status">
34 <div class="icon inform-icon"></div>
35 &nbsp;{ts}Are you sure you want to delete this Petition?{/ts}</div>
36 </td>
37 </tr>
38 </table>
39 {else}
40 {if $action eq 1}
41 <div class="help">
42 {ts}Use this form to Add new Survey. You can create a new Activity type, specific to this Survey or select an existing activity type for this Survey.{/ts}
43 </div>
44 {/if}
45 <table class="form-layout">
46 <tr class="crm-campaign-survey-form-block-title">
47 <td class="label">{$form.title.label}</td>
48 <td>{$form.title.html}
49 </tr>
50 <tr class="crm-campaign-survey-form-block-instructions">
51 <td class="label">{$form.instructions.label}</td>
52 <td class="view-value">{$form.instructions.html}
53 </tr>
54 <tr class="crm-campaign-survey-form-block-campaign_id">
55 <td class="label">{$form.campaign_id.label}</td>
56 <td>{$form.campaign_id.html}
57 </tr>
58 <tr class="crm-campaign-survey-form-block-activity_type_id">
59 <td class="label">{$form.activity_type_id.label}</td>
60 <td>{$form.activity_type_id.html}
61 </tr>
62 <tr class="crm-campaign-survey-form-block-profile_id">
63 <td class="label">{$form.contact_profile_id.label}</td>
64 <td>{$form.contact_profile_id.html}&nbsp;<span class="profile-links"></span>
65
66 <div class="description">{ts}Fields about the contact you want to collect.{/ts}</div>
67 </td>
68 </tr>
69 <tr class="crm-campaign-survey-form-block-profile_id">
70 <td class="label">{$form.profile_id.label}</td>
71 <td>{$form.profile_id.html}&nbsp;<span class="profile-links"></span>
72
73 <div class="description">{ts}Fields about the petition.{/ts}</div>
74 <div class="profile-create">
75 <a href="{crmURL p='civicrm/admin/uf/group/add' q='reset=1&action=add'}"
76 target="_blank">{ts}Click here for new profile{/ts}
77 </div>
78 </td>
79 </tr>
80 <tr class="crm-campaign-survey-form-block-thankyou_title">
81 <td
82 class="label">{$form.thankyou_title.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_survey' field='thankyou_title' id=$surveyId}{/if}</td>
83 <td>{$form.thankyou_title.html}<br/>
84
85 <div class="description">{ts}This title will be displayed at the top of the thank-you page.{/ts}</div>
86 </td>
87 </tr>
88 <tr class="crm-campaign-survey-form-block-thankyou_text">
89 <td
90 class="label">{$form.thankyou_text.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_survey' field='thankyou_text' id=$surveyId}{/if}</td>
91 <td>{$form.thankyou_text.html}<br/>
92
93 <div
94 class="description">{ts}Enter text (and optional HTML layout tags) for the thank-you message that will appear at the top of the thank-you page.{/ts}</div>
95 </td>
96 </tr>
97 <tr class="crm-campaign-survey-form-block-bypass_confirm">
98 <td class="label">{$form.bypass_confirm.label}</td>
99 <td>{$form.bypass_confirm.html}
100 <div class="description">{ts}Disable the email confirmation for unverified contacts?{/ts}</div>
101 </td>
102 </tr>
103 <tr class="crm-campaign-survey-form-block-is_share">
104 <td class="label">{$form.is_share.label}</td>
105 <td>{$form.is_share.html}
106 </tr>
107 <tr class="crm-campaign-survey-form-block-is_active">
108 <td class="label">{$form.is_active.label}</td>
109 <td>{$form.is_active.html}
110 <div class="description">{ts}Is this petition active?{/ts}</div>
111 </td>
112 </tr>
113 <tr class="crm-campaign-survey-form-block-is_default">
114 <td class="label">{$form.is_default.label}</td>
115 <td>{$form.is_default.html}
116 <div class="description">{ts}Is this the default petition?{/ts}</div>
117 </td>
118 </tr>
119 </table>
120 <div id="customData"></div>
121 {*include custom data js file*}
122 {include file="CRM/common/customData.tpl"}
123 {literal}
124 <script type="text/javascript">
125 CRM.$(function($) {
126 {/literal}
127 CRM.buildCustomData( 'Survey' );
128 {literal}
129 });
130 </script>
131 {/literal}
132 {/if}
133 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
134 </div>
135
136 {*include profile link function*}
137 {include file="CRM/common/buildProfileLink.tpl"}
138
139 {literal}
140 <script type="text/javascript">
141 //show edit profile field links
142 CRM.$(function($) {
143 // show edit for both contact and activity profile
144 $('select[id$="profile_id"]').change(function () {
145 buildLinks($(this), $(this).val());
146 });
147
148 // make sure we set edit links for both profiles when form loads
149 $('select[id$="profile_id"]').each(function (e) {
150 buildLinks($(this), $(this).val());
151 });
152 });
153 </script>
154 {/literal}