2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
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">
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");'>
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>
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>
58 <td colspan="2"> </td>
65 {foreach from=$CATEGORIES item="TYPES" key="CATEGORY_NAME"}
68 {if $APP_LIST.moduleList[$CATEGORY_NAME]!='Users'}
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]}
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 }
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 }
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>
100 <div class="acl{$ACTION.accessName}" id="{$ACTION.id}link" onclick="aclviewer.toggleDisplay('{$ACTION.id}')">{$ACTION.accessName}</div>
103 {assign var='ACTION_FIND' value='true'}
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>
120 <tr> <td colspan="2">No Actions Defined</td></tr>
123 <div style="padding-top:10px;">
124 <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">
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");'>