4886e0bd9f4f48952ef73c394630e985cfc10f2b
[civicrm-core.git] / templates / CRM / Contact / Form / Task / AddToGroup.tpl
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 <div class="crm-block crm-form-block crm-contact-task-addtogroup-form-block">
27 <table class="form-layout">
28 {if $group.id}
29 <tr class="crm-contact-task-addtogroup-form-block-group_id">
30 <td class="label">{ts}Group{/ts}</td>
31 <td>{$form.group_id.html}</td>
32 </tr>
33 {else}
34 <tr><td>{$form.group_option.html}</td></tr>
35 <tr id="id_existing_group">
36 <td>
37 <table class="form-layout">
38 <tr><td class="label">{$form.group_id.label}<span class="marker">*</span></td><td>{$form.group_id.html}</td></tr>
39 </table>
40 </td>
41 </tr>
42 <tr id="id_new_group" class="html-adjust">
43 <td>
44 <table class="form-layout">
45 <tr class="crm-contact-task-addtogroup-form-block-title">
46 <td class="label">{$form.title.label}<span class="marker">*</span></td>
47 <td>{$form.title.html}</td>
48 <tr>
49 <tr class="crm-contact-task-addtogroup-form-block-description">
50 <td class="label">{$form.description.label}</td>
51 <td>{$form.description.html}</td></tr>
52 {if $form.group_type}
53 <tr class="crm-contact-task-addtogroup-form-block-group_type">
54 <td class="label">{$form.group_type.label}</td>
55 <td>{$form.group_type.html}</td>
56 </tr>
57 {/if}
58 </table>
59 </td>
60 </tr>
61 {/if}
62 </table>
63 <table class="form-layout">
64 <tr><td>{include file="CRM/Contact/Form/Task.tpl"}</td></tr>
65 </table>
66 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
67 </div>
68 {include file="CRM/common/showHide.tpl"}
69
70 {if !$group.id}
71 {literal}
72 <script type="text/javascript">
73 showElements();
74 function showElements() {
75 if ( document.getElementsByName('group_option')[0].checked ) {
76 cj('#id_existing_group').show();
77 cj('#id_new_group').hide();
78 } else {
79 cj('#id_new_group').show();
80 cj('#id_existing_group').hide();
81 }
82 }
83 </script>
84 {/literal}
85 {/if}