]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/ACLRoles/EditAllBody.tpl
Release 6.5.0
[Github/sugarcrm.git] / modules / ACLRoles / EditAllBody.tpl
1 {*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 *}
38 <form method='POST' name='EditView' id='ACLEditView'>
39 <input type='hidden' name='record' value='{$ROLE.id}'>
40 <input type='hidden' name='module' value='ACLRoles'>
41 <input type='hidden' name='action' value='Save'>
42 <input type='hidden' name='return_record' value='{$RETURN.record}'>
43 <input type='hidden' name='return_action' value='{$RETURN.action}'>
44 <input type='hidden' name='return_module' value='{$RETURN.module}'> 
45 <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';aclviewer.save('ACLEditView');return false;" type="button" name="button" value="  {$APP.LBL_SAVE_BUTTON_LABEL}  " id="SAVE_HEADER"> &nbsp;
46 <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}"   class='button' accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" type='button' name='save' value="  {$APP.LBL_CANCEL_BUTTON_LABEL} " class='button' onclick='aclviewer.view("{$ROLE.id}", "All");'>
47 </p>
48 <p>
49 </p>
50 <TABLE width='100%' class='detail view' border='0' cellpadding=0 cellspacing = 1  >
51 <TR id="ACLEditView_Access_Header">
52 <td id="ACLEditView_Access_Header_category"></td>
53
54 {foreach from=$ACTION_NAMES item="ACTION_LABEL" key="ACTION_NAME"}
55         <td align='center' id="ACLEditView_Access_Header_{$ACTION_NAME}"><div align='center'><b>{$ACTION_LABEL}</b></div></td>
56 {foreachelse}
57
58           <td colspan="2">&nbsp;</td>
59
60 {/foreach}
61 </TR>
62 {literal}
63
64         {/literal}
65 {foreach from=$CATEGORIES item="TYPES" key="CATEGORY_NAME"}
66
67
68         {if $APP_LIST.moduleList[$CATEGORY_NAME]!='Users'}
69
70         <TR id="ACLEditView_Access_{$CATEGORY_NAME}">
71         <td nowrap width='1%' id="ACLEditView_Access_{$CATEGORY_NAME}_category"><b>
72         {if $APP_LIST.moduleList[$CATEGORY_NAME]=='Users'}
73            {$MOD.LBL_USER_NAME_FOR_ROLE}
74         {elseif !empty($APP_LIST.moduleList[$CATEGORY_NAME])}
75            {$APP_LIST.moduleList[$CATEGORY_NAME]}
76         {else}
77         {$CATEGORY_NAME}
78         {/if}
79         </b></td>
80         {foreach from=$ACTION_NAMES item="ACTION_LABEL" key="ACTION_NAME"}
81                 {assign var='ACTION_FIND' value='false'}
82                 {foreach from=$TYPES item="ACTIONS"}
83                         {foreach from=$ACTIONS item="ACTION" key="ACTION_NAME_ACTIVE"}
84                                 {if $ACTION_NAME==$ACTION_NAME_ACTIVE}
85                                         <td nowrap width='{$TDWIDTH}%' style="text-align: center;" id="ACLEditView_Access_{$CATEGORY_NAME}_{$ACTION_NAME}">
86                                         <div  style="display: none" id="{$ACTION.id}">
87                                         {if $APP_LIST.moduleList[$CATEGORY_NAME]==$APP_LIST.moduleList.Users && $ACTION_LABEL != $MOD.LBL_ACTION_ADMIN}
88                                         <select DISABLED name='act_guid{$ACTION.id}' id = 'act_guid{$ACTION.id}' onblur="document.getElementById('{$ACTION.id}link').innerHTML=this.options[this.selectedIndex].text; aclviewer.toggleDisplay('{$ACTION.id}');" >
89                     {html_options options=$ACTION.accessOptions selected=$ACTION.aclaccess }
90                     </select>
91                                         {else}
92                                         <select name='act_guid{$ACTION.id}' id = 'act_guid{$ACTION.id}' onblur="document.getElementById('{$ACTION.id}link').innerHTML=this.options[this.selectedIndex].text; aclviewer.toggleDisplay('{$ACTION.id}');" >
93                                         {html_options options=$ACTION.accessOptions selected=$ACTION.aclaccess }
94                                         </select>
95                                         {/if}
96                                         </div>
97                                         {if $ACTION.accessLabel == 'dev' || $ACTION.accessLabel == 'admin_dev'}
98                                            <div class="aclAdmin"  id="{$ACTION.id}link" onclick="aclviewer.toggleDisplay('{$ACTION.id}')">{$ACTION.accessName}</div>
99                                         {else}
100                        <div class="acl{$ACTION.accessName}"  id="{$ACTION.id}link" onclick="aclviewer.toggleDisplay('{$ACTION.id}')">{$ACTION.accessName}</div>
101                     {/if}
102                                         </td>
103                                         {assign var='ACTION_FIND' value='true'}
104                                 {/if}
105                         {/foreach}
106                 {/foreach}
107                 {if $ACTION_FIND=='false'}
108                         <td nowrap width='{$TDWIDTH}%' style="text-align: center;" id="ACLEditView_Access_{$CATEGORY_NAME}_{$ACTION_NAME}">
109                         <div><font color='red'>N/A</font></div>
110                         </td>
111                 {/if}
112         {/foreach}
113         </TR>
114
115
116     {/if}
117
118
119 {foreachelse}
120     <tr> <td colspan="2">No Actions Defined</td></tr>
121 {/foreach}
122 </TABLE>
123 <div style="padding-top:10px;">
124 &nbsp;<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" onclick="this.form.action.value='Save';aclviewer.save('ACLEditView');return false;" type="button" name="button" value="  {$APP.LBL_SAVE_BUTTON_LABEL}  " id="SAVE_FOOTER"> &nbsp;
125 <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}"   class='button' type='button' name='save' value="  {$APP.LBL_CANCEL_BUTTON_LABEL} " class='button' onclick='aclviewer.view("{$ROLE.id}", "All");'>
126 </div>
127 </form>