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