Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
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 | ||
6a488035 TO |
27 | <div class="crm-block crm-form-block crm-campaign-survey-main-form-block"> |
28 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> | |
29 | {if $action eq 1} | |
f6eedce7 | 30 | <div class="help"> |
6a488035 TO |
31 | {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} |
32 | </div> | |
33 | {/if} | |
34 | <table class="form-layout-compressed"> | |
35 | <tr class="crm-campaign-survey-main-form-block-title"> | |
36 | <td class="label">{$form.title.label}</td> | |
37 | <td class="view-value">{$form.title.html} | |
38 | <div class="description">{ts}Title of the survey.{/ts}</div></td> | |
39 | </tr> | |
40 | <tr class="crm-campaign-survey-main-form-block-campaign_id"> | |
41 | <td class="label">{$form.campaign_id.label}</td> | |
42 | <td class="view-value">{$form.campaign_id.html} <span class="action-link crm-campaign-survey-new_campaign_link"><a href="{crmURL p='civicrm/campaign/add' q='reset=1'}" target="_blank" title="{ts}Opens New Campaign form in a separate window{/ts}">{ts}new campaign{/ts}</a></span> | |
43 | <div class="description">{ts}Select the campaign for which survey is created.{/ts}</div> | |
44 | </td> | |
45 | </tr> | |
46 | <tr class="crm-campaign-survey-main-form-block-activity_type_id"> | |
47 | <td class="label">{$form.activity_type_id.label}</td> | |
48 | <td class="view-value">{$form.activity_type_id.html} | |
49 | <div class="description">{ts}Select the Activity Type.{/ts}</div></td> | |
50 | </tr> | |
51 | <tr class="crm-campaign-survey-main-form-block-instructions"> | |
52 | <td class="label">{$form.instructions.label}</td> | |
53 | <td class="view-value">{$form.instructions.html} | |
54 | </tr> | |
55 | <tr class="crm-campaign-survey-main-form-block-default_number_of_contacts"> | |
56 | <td class="label">{$form.default_number_of_contacts.label}</td> | |
57 | <td class="view-value">{$form.default_number_of_contacts.html} | |
58 | <div class="description">{ts}Maximum number of contacts that can be reserved for an interviewer at one time.{/ts}</div></td> | |
59 | </tr> | |
60 | <tr class="crm-campaign-survey-main-form-block-max_number_of_contacts"> | |
61 | <td class="label">{$form.max_number_of_contacts.label}</td> | |
62 | <td class="view-value">{$form.max_number_of_contacts.html} | |
63 | <div class="description">{ts}Maximum total number of contacts that can be in a reserved state for an interviewer.{/ts}</div></td> | |
64 | </tr> | |
65 | <tr class="crm-campaign-survey-main-form-block-release_frequency"> | |
66 | <td class="label">{$form.release_frequency.label}</td> | |
67 | <td class="view-value">{$form.release_frequency.html} | |
68 | <div class="description">{ts}Reserved respondents are released if they haven't been surveyed within this number of days. The Respondent Processor script must be run periodically to release respondents.{/ts} {docURL page="Managing Scheduled Jobs" resource="wiki"}</div> </td> | |
69 | </tr> | |
70 | <tr class="crm-campaign-survey-main-form-block-is_active"> | |
71 | <td class="label">{$form.is_active.label}</td> | |
72 | <td class="view-value">{$form.is_active.html} | |
73 | <div class="description">{ts}Is this survey active?{/ts}</div></td> | |
74 | </tr> | |
75 | <tr class="crm-campaign-survey-main-form-block-is_default"> | |
76 | <td class="label">{$form.is_default.label}</td> | |
77 | <td class="view-value">{$form.is_default.html} | |
78 | <div class="description">{ts}Is this the default survey?{/ts}</div></td> | |
79 | </tr> | |
80 | <tr class="crm-campaign-form-block-custom_data"> | |
81 | <td colspan="2"> | |
82 | <div id="customData"></div> | |
83 | </td> | |
84 | </tr> | |
85 | </table> | |
98c54bff AH |
86 | <div id="customData"></div> |
87 | {*include custom data js file*} | |
88 | {include file="CRM/common/customData.tpl"} | |
89 | {literal} | |
90 | <script type="text/javascript"> | |
91 | CRM.$(function($) { | |
92 | {/literal} | |
93 | CRM.buildCustomData( 'Survey' ); | |
94 | {literal} | |
95 | }); | |
96 | </script> | |
97 | {/literal} | |
6a488035 TO |
98 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> |
99 | </div> | |
100 | ||
101 | {*include profile link function*} | |
102 | {include file="CRM/common/buildProfileLink.tpl"} | |
103 | ||
104 | {literal} | |
105 | <script type="text/javascript"> | |
106 | //show edit profile field links | |
3cc60a06 | 107 | CRM.$(function($) { |
6a488035 | 108 | // show edit for profile |
ae8f569f CW |
109 | $('select[id="profile_id"]').change( function( ) { |
110 | buildLinks( $(this), $(this).val()); | |
6a488035 TO |
111 | }); |
112 | ||
113 | // show edit links on form loads | |
ae8f569f | 114 | var profileField = $('select[id="profile_id"]'); |
6a488035 TO |
115 | buildLinks( profileField, profileField.val()); |
116 | }); | |
117 | </script> | |
118 | {/literal} | |
6a488035 TO |
119 | {literal} |
120 | <script type="text/javascript"> | |
ae8f569f | 121 | CRM.$(function($) { |
6a488035 TO |
122 | {/literal} |
123 | CRM.buildCustomData( 'Survey' ); | |
124 | {literal} | |
125 | }); | |
126 | </script> | |
127 | {/literal} |