Merge pull request #15813 from eileenmcnaughton/fee
[civicrm-core.git] / templates / CRM / Campaign / Form / Task / Reserve.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
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 |
8 +--------------------------------------------------------------------+
9 *}
10 <h3>
11 {ts}Add Respondent Reservation(s){/ts}
12 </h3>
13 <div class="crm-form-block crm-block crm-campaign-task-reserve-form-block">
14 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
15 <table class="form-layout-compressed">
16 <tr class="crm-campaign-task-reserve-form-block-surveytitle">
17 <td colspan=2>
18 <div class="status">
19 <div class="icon inform-icon"></div>&nbsp;{ts 1=$surveyTitle}Do you want to reserve respondents for '%1' ?{/ts}
20 </div>
21 </td>
22 </tr>
23 <tr><td colspan=2>{include file="CRM/Contact/Form/Task.tpl"}</td></tr>
24 </table>
25
26 {* Group options *}
27 {* New Group *}
28 <div id="new-group" class="crm-accordion-wrapper collapsed">
29 <div class="crm-accordion-header">
30 {ts}Add respondent(s) to a new group{/ts}
31 </div><!-- /.crm-accordion-header -->
32 <div class="crm-accordion-body">
33 <table class="form-layout-compressed">
34 <tr>
35 <td class="description label">{$form.newGroupName.label}</td>
36 <td>{$form.newGroupName.html}</td>
37 </tr>
38 <tr>
39 <td class="description label">{$form.newGroupDesc.label}</td>
40 <td>{$form.newGroupDesc.html}</td>
41 </tr>
42 </table>
43 </div><!-- /.crm-accordion-body -->
44 </div><!-- /.crm-accordion-wrapper -->
45
46
47 {* Existing Group *}
48 <div class="crm-accordion-wrapper crm-existing_group-accordion {if $hasExistingGroups} {else}collapsed{/if}">
49 <div class="crm-accordion-header">
50 {ts}Add respondent(s) to existing group(s){/ts}
51 </div><!-- /.crm-accordion-header -->
52 <div class="crm-accordion-body">
53
54 <div class="form-item">
55 <table><tr><td style="width: 14em;"></td><td>{$form.groups.html}</td></tr></table>
56 </div>
57 </div><!-- /.crm-accordion-body -->
58 </div><!-- /.crm-accordion-wrapper -->
59 {* End of group options *}
60
61
62 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
63 </div>
64
65 {literal}
66 <script type="text/javascript">
67
68 CRM.$(function($) {
69 setDefaultGroup( );
70 });
71
72 function setDefaultGroup( )
73 {
74 var invalidGroupName = {/literal}'{$invalidGroupName}'{literal};
75 if ( invalidGroupName ) {
76 cj("#new-group.collapsed").crmAccordionToggle();
77 } else {
78 cj("#newGroupName").val( '' );
79 cj("#newGroupDesc").val( '' );
80 }
81 }
82 </script>
83 {/literal}