Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-07-14-13-42-39
[civicrm-core.git] / templates / CRM / ACL / Form / ACL.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 {* this template is used for adding/editing ACL *}
27 <h3>{if $action eq 1}{ts}New ACL{/ts}{elseif $action eq 2}{ts}Edit ACL{/ts}{else}{ts}Delete ACL{/ts}{/if}</h3>
28 <div class="crm-block crm-form-block crm-acl-form-block">
29 {if $action eq 8}
30 <div class="messages status no-popup">
31 <div class="icon inform-icon"></div>&nbsp;
32 {ts}WARNING: Delete will remove this permission from the specified ACL Role.{/ts} {ts}Do you want to continue?{/ts}
33 </div>
34 {else}
35 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
36 <table class="form-layout-compressed">
37 <tr class="crm-acl-form-block-name">
38 <td class="label">{$form.name.label}</td>
39 <td>{$form.name.html}<br />
40 <span class="description">{ts}Enter a descriptive name for this permission (e.g. 'Edit Advisory Board Contacts').{/ts}</span>
41 </td>
42 </tr>
43 <tr class="crm-acl-form-block-entity_id">
44 <td class="label">{$form.entity_id.label}</td>
45 <td>{$form.entity_id.html}<br />
46 <span class="description">{ts}Select a Role to assign (grant) this permission to. Select the special role 'Everyone' if you want to grant this permission to ALL users. 'Everyone' includes anonymous (i.e. not logged in) users. Select the special role 'Authenticated' if you want to grant it to any logged in user.{/ts}</span>
47 </td>
48 </tr>
49 <tr class="crm-acl-form-block-operation">
50 <td class="label">{$form.operation.label}</td>
51 <td>{$form.operation.html}<br />
52 <span class="description">{ts}What type of operation (action) is being permitted?{/ts}</span>
53 </td>
54 </tr>
55 <tr class="crm-acl-form-block-object_type">
56 <td class="label">{$form.object_type.label}</td>
57 <td>{$form.object_type.html}</td>
58 </tr>
59 <tr class="crm-acl-form-block-description">
60 <td class="{$form.object_type.name}">&nbsp;</dt><td class="description">{ts}Select the type of data this ACL operates on.{/ts}<br />
61 {if $config->userSystem->is_drupal EQ '1'}
62 <div class="status description">{ts}IMPORTANT: The Drupal permissions for 'access all custom data' and 'profile listings and forms' override and disable specific ACL settings for custom field groups and profiles respectively. Do not enable those Drupal permissions for a Drupal role if you want to use CiviCRM ACL's to control access.{/ts}</div></td>
63 {/if}
64 </tr>
65 </table>
66 <div id="id-group-acl">
67 <table class="form-layout-compressed">
68 <tr class="crm-acl-form-block-group_id">
69 <td class="label">{$form.group_id.label}</td>
70 <td>{$form.group_id.html}<br />
71 <span class="description">{ts}Select a specific group of contacts, OR apply this permission to ALL groups.{/ts}</span>
72 </td>
73 </tr>
74 </table>
75 </div>
76 <div id="id-profile-acl">
77 <table class="form-layout-compressed" >
78 <tr class="crm-acl-form-block-uf_group_id">
79 <td class="label">{$form.uf_group_id.label}</td>
80 <td>{$form.uf_group_id.html}<br />
81 <span class="description">{ts}Select a specific profile, OR apply this permission to ALL profiles.{/ts}</span>
82 </td>
83 </tr>
84 </table>
85 <div class="status message">{ts}NOTE: Profile ACL operations affect which modes a profile can be used in (i.e. Create a new contact, Edit your own contact record, View a contact record, etc.). The Create operation is required for profiles embedded in online contribution or event registration forms. None of the operations for Profile ACLs grant access to administration of profiles.{/ts}</div>
86 </div>
87 <div id="id-custom-acl">
88 <table class="form-layout-compressed">
89 <tr class="crm-acl-form-block-custom_group_id">
90 <td class="label">{$form.custom_group_id.label}</td>
91 <td>{$form.custom_group_id.html}<br />
92 <span class="description">{ts}Select a specific group of custom fields, OR apply this permission to ALL custom fields.{/ts}</span>
93 </td>
94 </tr>
95 </table>
96 <div class="status message">{ts}NOTE: For Custom Data ACLs, the 'View' and 'Edit' operations currently do the same thing. Either option grants the right to view AND / OR edit custom data fields (in all groups, or in a specific custom data group). Neither option grants access to administration of custom data fields.{/ts}</div>
97 </div>
98 <div id="id-event-acl">
99 <table class="form-layout-compressed">
100 <tr class="crm-acl-form-block-event_id">
101 <td class="label">{$form.event_id.label}</td>
102 <td>{$form.event_id.html}<br />
103 <span class="description">{ts}Select an event, OR apply this permission to ALL events.{/ts}</span>
104 </td>
105 </tr>
106 </table>
107 <div class="status message">{ts}NOTE: For Event ACLs, the 'View' operation allows access to the event information screen. "Edit" allows users to register for the event if online registration is enabled.{/ts}<br />
108 {if $config->userSystem->is_drupal EQ '1'}
109 {ts}Please remember that Drupal's "register for events" permission overrides CiviCRM's control over event information access.{/ts}
110 {/if}
111 </div>
112 </div>
113 <table class="form-layout-compressed">
114 <tr class="crm-acl-form-block-is_active">
115 <td class="label">{$form.is_active.label}</td>
116 <td>{$form.is_active.html}</td>
117 </tr>
118 </table>
119 {/if}
120 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
121 </div>
122
123 {include file="CRM/common/showHide.tpl"}
124 {literal}
125 <script type="text/javascript">
126 showObjectSelect( );
127 function showObjectSelect( ) {
128 var ot = document.getElementsByName('object_type');
129 for (var i = 0; i < ot.length; i++) {
130 if ( ot[i].checked ) {
131 switch(ot[i].value) {
132 case "1":
133 cj('#id-group-acl').show();
134 cj('#id-profile-acl').hide();
135 cj('#id-custom-acl').hide();
136 cj('#id-event-acl').hide();
137 break;
138 case "2":
139 cj('#id-group-acl').hide();
140 cj('#id-profile-acl').show();
141 cj('#id-custom-acl').hide();
142 cj('#id-event-acl').hide();
143 break;
144 case "3":
145 cj('#id-group-acl').hide();
146 cj('#id-profile-acl').hide();
147 cj('#id-custom-acl').show();
148 cj('#id-event-acl').hide();
149 break;
150 case "4":
151 cj('#id-group-acl').hide();
152 cj('#id-profile-acl').hide();
153 cj('#id-custom-acl').hide();
154 cj('#id-event-acl').show();
155 break;
156 }
157 }
158 }
159 return;
160 }
161 </script>
162 {/literal}