Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | ||
11 | <div class="crm-block crm-form-block crm-campaign-survey-form-block"> | |
424392c5 | 12 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> |
13 | {if $action eq 8} | |
14 | <table class="form-layout"> | |
15 | <tr> | |
16 | <td colspan="2"> | |
17 | <div class="status"> | |
18 | <div class="icon inform-icon"></div> | |
19 | {ts}Are you sure you want to delete this Petition?{/ts}</div> | |
20 | </td> | |
21 | </tr> | |
22 | </table> | |
23 | {else} | |
24 | {if $action eq 1} | |
f6eedce7 | 25 | <div class="help"> |
424392c5 | 26 | {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} |
27 | </div> | |
28 | {/if} | |
29 | <table class="form-layout"> | |
30 | <tr class="crm-campaign-survey-form-block-title"> | |
31 | <td class="label">{$form.title.label}</td> | |
32 | <td>{$form.title.html} | |
33 | </tr> | |
34 | <tr class="crm-campaign-survey-form-block-instructions"> | |
35 | <td class="label">{$form.instructions.label}</td> | |
36 | <td class="view-value">{$form.instructions.html} | |
37 | </tr> | |
38 | <tr class="crm-campaign-survey-form-block-campaign_id"> | |
39 | <td class="label">{$form.campaign_id.label}</td> | |
40 | <td>{$form.campaign_id.html} | |
41 | </tr> | |
42 | <tr class="crm-campaign-survey-form-block-activity_type_id"> | |
43 | <td class="label">{$form.activity_type_id.label}</td> | |
44 | <td>{$form.activity_type_id.html} | |
45 | </tr> | |
46 | <tr class="crm-campaign-survey-form-block-profile_id"> | |
47 | <td class="label">{$form.contact_profile_id.label}</td> | |
48 | <td>{$form.contact_profile_id.html} <span class="profile-links"></span> | |
49 | ||
50 | <div class="description">{ts}Fields about the contact you want to collect.{/ts}</div> | |
51 | </td> | |
52 | </tr> | |
53 | <tr class="crm-campaign-survey-form-block-profile_id"> | |
54 | <td class="label">{$form.profile_id.label}</td> | |
55 | <td>{$form.profile_id.html} <span class="profile-links"></span> | |
56 | ||
57 | <div class="description">{ts}Fields about the petition.{/ts}</div> | |
58 | <div class="profile-create"> | |
59 | <a href="{crmURL p='civicrm/admin/uf/group/add' q='reset=1&action=add'}" | |
60 | target="_blank">{ts}Click here for new profile{/ts} | |
61 | </div> | |
62 | </td> | |
63 | </tr> | |
6a488035 | 64 | <tr class="crm-campaign-survey-form-block-thankyou_title"> |
424392c5 | 65 | <td |
e62b3bb9 | 66 | 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> |
424392c5 | 67 | <td>{$form.thankyou_title.html}<br/> |
68 | ||
69 | <div class="description">{ts}This title will be displayed at the top of the thank-you page.{/ts}</div> | |
70 | </td> | |
6a488035 TO |
71 | </tr> |
72 | <tr class="crm-campaign-survey-form-block-thankyou_text"> | |
424392c5 | 73 | <td |
e62b3bb9 | 74 | 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> |
424392c5 | 75 | <td>{$form.thankyou_text.html}<br/> |
76 | ||
77 | <div | |
78 | 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> | |
79 | </td> | |
80 | </tr> | |
81 | <tr class="crm-campaign-survey-form-block-bypass_confirm"> | |
82 | <td class="label">{$form.bypass_confirm.label}</td> | |
83 | <td>{$form.bypass_confirm.html} | |
84 | <div class="description">{ts}Disable the email confirmation for unverified contacts?{/ts}</div> | |
85 | </td> | |
6a488035 | 86 | </tr> |
424392c5 | 87 | <tr class="crm-campaign-survey-form-block-is_share"> |
88 | <td class="label">{$form.is_share.label}</td> | |
89 | <td>{$form.is_share.html} | |
90 | </tr> | |
91 | <tr class="crm-campaign-survey-form-block-is_active"> | |
92 | <td class="label">{$form.is_active.label}</td> | |
93 | <td>{$form.is_active.html} | |
94 | <div class="description">{ts}Is this petition active?{/ts}</div> | |
95 | </td> | |
96 | </tr> | |
97 | <tr class="crm-campaign-survey-form-block-is_default"> | |
98 | <td class="label">{$form.is_default.label}</td> | |
99 | <td>{$form.is_default.html} | |
100 | <div class="description">{ts}Is this the default petition?{/ts}</div> | |
101 | </td> | |
102 | </tr> | |
103 | </table> | |
14c67729 | 104 | {include file="CRM/common/customDataBlock.tpl"} |
424392c5 | 105 | {/if} |
106 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
6a488035 TO |
107 | </div> |
108 | ||
109 | {*include profile link function*} | |
110 | {include file="CRM/common/buildProfileLink.tpl"} | |
111 | ||
112 | {literal} | |
424392c5 | 113 | <script type="text/javascript"> |
6a488035 | 114 | //show edit profile field links |
3cc60a06 | 115 | CRM.$(function($) { |
424392c5 | 116 | // show edit for both contact and activity profile |
ae8f569f CW |
117 | $('select[id$="profile_id"]').change(function () { |
118 | buildLinks($(this), $(this).val()); | |
424392c5 | 119 | }); |
6a488035 | 120 | |
424392c5 | 121 | // make sure we set edit links for both profiles when form loads |
ae8f569f CW |
122 | $('select[id$="profile_id"]').each(function (e) { |
123 | buildLinks($(this), $(this).val()); | |
424392c5 | 124 | }); |
6a488035 | 125 | }); |
424392c5 | 126 | </script> |
6a488035 | 127 | {/literal} |