Merge pull request #2763 from colemanw/master
[civicrm-core.git] / templates / CRM / Campaign / Form / Task / Reserve.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 <h3>
27 {ts}Add Respondent Reservation(s){/ts}
28 </h3>
29 <div class="crm-form-block crm-block crm-campaign-task-reserve-form-block">
30 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
31 <table class="form-layout-compressed">
32 <tr class="crm-campaign-task-reserve-form-block-surveytitle">
33 <td colspan=2>
34 <div class="status">
35 <div class="icon inform-icon"></div>&nbsp;{ts 1=$surveyTitle}Do you want to reserve respondents for '%1' ?{/ts}
36 </div>
37 </td>
38 </tr>
39 <tr><td colspan=2>{include file="CRM/Contact/Form/Task.tpl"}</td></tr>
40 </table>
41
42 {* Group options *}
43 {* New Group *}
44 <div id="new-group" class="crm-accordion-wrapper collapsed">
45 <div class="crm-accordion-header">
46 {ts}Add respondent(s) to a new group{/ts}
47 </div><!-- /.crm-accordion-header -->
48 <div class="crm-accordion-body">
49 <table class="form-layout-compressed">
50 <tr>
51 <td class="description label">{$form.newGroupName.label}</td>
52 <td>{$form.newGroupName.html}</td>
53 </tr>
54 <tr>
55 <td class="description label">{$form.newGroupDesc.label}</td>
56 <td>{$form.newGroupDesc.html}</td>
57 </tr>
58 </table>
59 </div><!-- /.crm-accordion-body -->
60 </div><!-- /.crm-accordion-wrapper -->
61
62
63 {* Existing Group *}
64 <div class="crm-accordion-wrapper crm-existing_group-accordion {if $hasExistingGroups} {else}collapsed{/if}">
65 <div class="crm-accordion-header">
66 {ts}Add respondent(s) to existing group(s){/ts}
67 </div><!-- /.crm-accordion-header -->
68 <div class="crm-accordion-body">
69
70 <div class="form-item">
71 <table><tr><td style="width: 14em;"></td><td>{$form.groups.html}</td></tr></table>
72 </div>
73 </div><!-- /.crm-accordion-body -->
74 </div><!-- /.crm-accordion-wrapper -->
75 {* End of group options *}
76
77
78 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
79 </div>
80
81 {literal}
82 <script type="text/javascript">
83
84 cj(function() {
85 cj().crmAccordions();
86 setDefaultGroup( );
87 });
88
89 function setDefaultGroup( )
90 {
91 var invalidGroupName = {/literal}'{$invalidGroupName}'{literal};
92 if ( invalidGroupName ) {
93 cj("#new-group.collapsed").crmAccordionToggle();
94 } else {
95 cj("#newGroupName").val( '' );
96 cj("#newGroupDesc").val( '' );
97 }
98 }
99 </script>
100 {/literal}