Merge pull request #2548 from rcsheets/doc_improvements
[civicrm-core.git] / templates / CRM / Group / Form / Edit.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 {* this template is used for adding/editing group (name and description only) *}
27 <div class="crm-block crm-form-block crm-group-form-block">
28 <div id="help">
29 {if $action eq 2}
30 {capture assign=crmURL}class="no-popup" href="{crmURL p="civicrm/group/search" q="reset=1&force=1&context=smog&gid=`$group.id`"}"{/capture}
31 {ts 1=$crmURL}You can edit the Name and Description for this group here. Click <a %1>Contacts in this Group</a> to view, add or remove contacts in this group.{/ts}
32 {else}
33 {ts}Enter a unique name and a description for your new group here. Then click 'Continue' to find contacts to add to your new group.{/ts}
34 {/if}
35 </div>
36 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
37 <table class="form-layout">
38 <tr class="crm-group-form-block-title">
39 <td class="label">{$form.title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_group' field='title' id=$group.id}{/if}</td>
40 <td>{$form.title.html|crmAddClass:huge}
41 {if $group.saved_search_id}&nbsp;({ts}Smart Group{/ts}){/if}
42 </td>
43 </tr>
44
45 {if $group.created_by}
46 <tr class="crm-group-form-block-created">
47 <td class="label">{ts}Created By{/ts}</td>
48 <td>{$group.created_by}</td>
49 </tr>
50 {/if}
51
52 {if $group.modified_by}
53 <tr class="crm-group-form-block-modified">
54 <td class="label">{ts}Modified By{/ts}</td>
55 <td>{$group.modified_by}</td>
56 </tr>
57 {/if}
58
59 <tr class="crm-group-form-block-description">
60 <td class="label">{$form.description.label}</td>
61 <td>{$form.description.html}<br />
62 <span class="description">{ts}Group description is displayed when groups are listed in Profiles and Mailing List Subscribe forms.{/ts}</span>
63 </td>
64 </tr>
65
66 {if $form.group_type}
67 <tr class="crm-group-form-block-group_type">
68 <td class="label">{$form.group_type.label}</td>
69 <td>{$form.group_type.html} {help id="id-group-type" file="CRM/Group/Page/Group.hlp"}</td>
70 </tr>
71 {/if}
72
73 <tr class="crm-group-form-block-visibility">
74 <td class="label">{$form.visibility.label}</td>
75 <td>{$form.visibility.html|crmAddClass:huge} {help id="id-group-visibility" file="CRM/Group/Page/Group.hlp"}</td>
76 </tr>
77
78 <tr class="crm-group-form-block-isReserved">
79 <td class="report-label">{$form.is_reserved.label}</td>
80 <td>{$form.is_reserved.html}
81 <span class="description">{ts}If reserved, only users with 'administer reserved groups' permission can disable, delete, or change settings for this group. The reserved flag does NOT affect users ability to add or remove contacts from a group.{/ts}</span>
82 </td>
83 </tr>
84
85 <tr>
86 <td colspan=2>{include file="CRM/Custom/Form/CustomData.tpl"}</td>
87 </tr>
88 </table>
89
90 {if $parent_groups|@count > 0 or $form.parents.html}
91 <h3>{ts}Parent Groups{/ts} {help id="id-group-parent" file="CRM/Group/Page/Group.hlp"}</h3>
92 {if $parent_groups|@count > 0}
93 <table class="form-layout-compressed">
94 <tr>
95 <td><label>{ts}Remove Parent?{/ts}</label></td>
96 </tr>
97 {foreach from=$parent_groups item=cgroup key=group_id}
98 {assign var="element_name" value="remove_parent_group_"|cat:$group_id}
99 <tr>
100 <td>&nbsp;&nbsp;{$form.$element_name.html}&nbsp;{$form.$element_name.label}</td>
101 </tr>
102 {/foreach}
103 </table>
104 <br />
105 {/if}
106 <table class="form-layout-compressed">
107 <tr class="crm-group-form-block-parents">
108 <td class="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$form.parents.label}</td>
109 <td>{$form.parents.html|crmAddClass:huge}</td>
110 </tr>
111 </table>
112 {/if}
113
114 {if $form.organization_id}
115 <h3>{ts}Associated Organization{/ts} {help id="id-group-organization" file="CRM/Group/Page/Group.hlp"}</h3>
116 <table class="form-layout-compressed">
117 <tr class="crm-group-form-block-organization">
118 <td class="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$form.organization_id.label}</td>
119 <td>{$form.organization_id.html|crmAddClass:huge}
120 </td>
121 </tr>
122 </table>
123 {/if}
124
125 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
126 {if $action neq 1}
127 <div class="action-link">
128 <a class="no-popup" href="{$crmURL}">&raquo; {ts}Contacts in this Group{/ts}</a>
129 {if $group.saved_search_id}
130 <br />
131 {if $group.mapping_id}
132 <a class="no-popup" href="{crmURL p="civicrm/contact/search/builder" q="reset=1&force=1&ssID=`$group.saved_search_id`"}">&raquo; {ts}Edit Smart Group Criteria{/ts}</a>
133 {elseif $group.search_custom_id}
134 <a class="no-popup" href="{crmURL p="civicrm/contact/search/custom" q="reset=1&force=1&ssID=`$group.saved_search_id`"}">&raquo; {ts}Edit Smart Group Criteria{/ts}</a>
135 {else}
136 <a class="no-popup" href="{crmURL p="civicrm/contact/search/advanced" q="reset=1&force=1&ssID=`$group.saved_search_id`"}">&raquo; {ts}Edit Smart Group Criteria{/ts}</a>
137 {/if}
138
139 {/if}
140 </div>
141 {/if}
142 </fieldset>
143
144 {literal}
145 <script type="text/javascript">
146 {/literal}{if $freezeMailignList}{literal}
147 cj('input[type=checkbox][name="group_type[{/literal}{$freezeMailignList}{literal}]"]').prop('disabled',true);
148 {/literal}{/if}{literal}
149 {/literal}{if $hideMailignList}{literal}
150 cj('input[type=checkbox][name="group_type[{/literal}{$hideMailignList}{literal}]"]').hide();
151 cj('label[for="group_type[{/literal}{$hideMailignList}{literal}]"]').hide();
152 {/literal}{/if}{literal}
153 </script>
154 {/literal}
155 </div>