QA fixes
[civicrm-core.git] / templates / CRM / ACL / Form / ACL.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 {* this template is used for adding/editing ACL *}
11 <div class="crm-block crm-form-block crm-acl-form-block">
12 {if $action eq 8}
13 <div class="messages status no-popup">
14 {icon icon="fa-info-circle"}{/icon}
15 {ts}WARNING: Delete will remove this permission from the specified ACL Role.{/ts} {ts}Do you want to continue?{/ts}
16 </div>
17 {else}
18 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
19 <table class="form-layout-compressed">
20 <tr class="crm-acl-form-block-name">
21 <td class="label">{$form.name.label}</td>
22 <td>{$form.name.html}<br />
23 <span class="description">{ts}Enter a descriptive name for this permission (e.g. 'Edit Advisory Board Contacts').{/ts}</span>
24 </td>
25 </tr>
26 <tr class="crm-acl-form-block-entity_id">
27 <td class="label">{$form.entity_id.label}</td>
28 <td>{$form.entity_id.html}<br />
29 <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>
30 </td>
31 </tr>
32 <tr class="crm-acl-form-block-operation">
33 <td class="label">{$form.operation.label}</td>
34 <td>{$form.operation.html}<br />
35 <span class="description">{ts}What type of operation (action) is being permitted?{/ts}</span>
36 </td>
37 </tr>
38 <tr class="crm-acl-form-block-object_type">
39 <td class="label">{$form.object_type.label}</td>
40 <td>{$form.object_type.html}</td>
41 </tr>
42 <tr class="crm-acl-form-block-description">
43 <td class="{$form.object_type.name}">&nbsp;</dt><td class="description">{ts}Select the type of data this ACL operates on.{/ts}<br />
44 {if $config->userSystem->is_drupal EQ '1'}
45 <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>
46 {/if}
47 </tr>
48 </table>
49 <div id="id-group-acl">
50 <table class="form-layout-compressed">
51 <tr class="crm-acl-form-block-group_id">
52 <td class="label">{$form.group_id.label}</td>
53 <td>{$form.group_id.html}<br />
54 <span class="description">{ts}Select a specific group of contacts, OR apply this permission to ALL groups.{/ts}</span>
55 </td>
56 </tr>
57 </table>
58 </div>
59 <div id="id-profile-acl">
60 <table class="form-layout-compressed" >
61 <tr class="crm-acl-form-block-uf_group_id">
62 <td class="label">{$form.uf_group_id.label}</td>
63 <td>{$form.uf_group_id.html}<br />
64 <span class="description">{ts}Select a specific profile, OR apply this permission to ALL profiles.{/ts}</span>
65 </td>
66 </tr>
67 </table>
68 <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>
69 </div>
70 <div id="id-custom-acl">
71 <table class="form-layout-compressed">
72 <tr class="crm-acl-form-block-custom_group_id">
73 <td class="label">{$form.custom_group_id.label}</td>
74 <td>{$form.custom_group_id.html}<br />
75 <span class="description">{ts}Select a specific group of custom fields, OR apply this permission to ALL custom fields.{/ts}</span>
76 </td>
77 </tr>
78 </table>
79 <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>
80 </div>
81 <div id="id-event-acl">
82 <table class="form-layout-compressed">
83 <tr class="crm-acl-form-block-event_id">
84 <td class="label">{$form.event_id.label}</td>
85 <td>{$form.event_id.html}<br />
86 <span class="description">{ts}Select an event, OR apply this permission to ALL events.{/ts}</span>
87 </td>
88 </tr>
89 </table>
90 <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 />
91 {if $config->userSystem->is_drupal EQ '1'}
92 {ts}Please remember that Drupal's "register for events" permission overrides CiviCRM's control over event information access.{/ts}
93 {/if}
94 </div>
95 </div>
96 <table class="form-layout-compressed">
97 <tr class="crm-acl-form-block-is_active">
98 <td class="label">{$form.is_active.label}</td>
99 <td>{$form.is_active.html}</td>
100 </tr>
101 </table>
102 {/if}
103 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
104 </div>
105
106 {include file="CRM/common/showHide.tpl"}
107 {literal}
108 <script type="text/javascript">
109 showObjectSelect( );
110 function showObjectSelect( ) {
111 var ot = document.getElementsByName('object_type');
112 for (var i = 0; i < ot.length; i++) {
113 if ( ot[i].checked ) {
114 switch(ot[i].value) {
115 case "1":
116 cj('#id-group-acl').show();
117 cj('#id-profile-acl').hide();
118 cj('#id-custom-acl').hide();
119 cj('#id-event-acl').hide();
120 break;
121 case "2":
122 cj('#id-group-acl').hide();
123 cj('#id-profile-acl').show();
124 cj('#id-custom-acl').hide();
125 cj('#id-event-acl').hide();
126 break;
127 case "3":
128 cj('#id-group-acl').hide();
129 cj('#id-profile-acl').hide();
130 cj('#id-custom-acl').show();
131 cj('#id-event-acl').hide();
132 break;
133 case "4":
134 cj('#id-group-acl').hide();
135 cj('#id-profile-acl').hide();
136 cj('#id-custom-acl').hide();
137 cj('#id-event-acl').show();
138 break;
139 }
140 }
141 }
142 return;
143 }
144 </script>
145 {/literal}