@@ -61,29 +61,29 @@ discard block |
||
61 | 61 | $role_name = ''; |
62 | 62 | $return= array('module'=>'ACLRoles', 'action'=>'index', 'record'=>''); |
63 | 63 | if(!empty($_REQUEST['record'])){ |
64 | - $role->retrieve($_REQUEST['record']); |
|
65 | - $categories = ACLRole::getRoleActions($_REQUEST['record']); |
|
66 | - $role_name = $role->name; |
|
67 | - if(!empty($_REQUEST['isDuplicate'])){ |
|
68 | - //role id is stripped here in duplicate so anything using role id after this will not have it |
|
69 | - $role->id = ''; |
|
70 | - $sugar_smarty->assign('ISDUPLICATE', $_REQUEST['record']); |
|
71 | - $duplicateString=translate('LBL_DUPLICATE_OF', 'ACLRoles'); |
|
72 | - }else{ |
|
73 | - $return['record']= $role->id; |
|
74 | - $return['action']='DetailView'; |
|
75 | - } |
|
64 | + $role->retrieve($_REQUEST['record']); |
|
65 | + $categories = ACLRole::getRoleActions($_REQUEST['record']); |
|
66 | + $role_name = $role->name; |
|
67 | + if(!empty($_REQUEST['isDuplicate'])){ |
|
68 | + //role id is stripped here in duplicate so anything using role id after this will not have it |
|
69 | + $role->id = ''; |
|
70 | + $sugar_smarty->assign('ISDUPLICATE', $_REQUEST['record']); |
|
71 | + $duplicateString=translate('LBL_DUPLICATE_OF', 'ACLRoles'); |
|
72 | + }else{ |
|
73 | + $return['record']= $role->id; |
|
74 | + $return['action']='DetailView'; |
|
75 | + } |
|
76 | 76 | |
77 | 77 | }else{ |
78 | - $categories = ACLRole::getRoleActions(''); |
|
78 | + $categories = ACLRole::getRoleActions(''); |
|
79 | 79 | } |
80 | 80 | $sugar_smarty->assign('ROLE', $role->toArray()); |
81 | 81 | $tdwidth = 10; |
82 | 82 | |
83 | 83 | if(isset($_REQUEST['return_module'])){ |
84 | - $return['module']=$_REQUEST['return_module']; |
|
85 | - if(isset($_REQUEST['return_id']))$return['record']=$_REQUEST['return_id']; |
|
86 | - if(isset($_REQUEST['return_record'])){$return['record']=$_REQUEST['return_record'];} |
|
84 | + $return['module']=$_REQUEST['return_module']; |
|
85 | + if(isset($_REQUEST['return_id']))$return['record']=$_REQUEST['return_id']; |
|
86 | + if(isset($_REQUEST['return_record'])){$return['record']=$_REQUEST['return_record'];} |
|
87 | 87 | if(isset($_REQUEST['return_action'])){$return['action']=$_REQUEST['return_action'];} |
88 | 88 | if ( !empty($return['record']) ) { |
89 | 89 | $return['action'] = 'DetailView'; |
@@ -100,18 +100,18 @@ discard block |
||
100 | 100 | $params = array(); |
101 | 101 | $params[] = "<a href='index.php?module=ACLRoles&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>"; |
102 | 102 | if(empty($role->id)){ |
103 | - $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; |
|
103 | + $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; |
|
104 | 104 | }else{ |
105 | - $params[] = $role->get_summary_text(); |
|
105 | + $params[] = $role->get_summary_text(); |
|
106 | 106 | } |
107 | 107 | echo getClassicModuleTitle("ACLRoles", $params, true); |
108 | 108 | |
109 | 109 | $buttons = array( |
110 | - "<input title=".$app_strings['LBL_SAVE_BUTTON_TITLE']." id='save_button' |
|
110 | + "<input title=".$app_strings['LBL_SAVE_BUTTON_TITLE']." id='save_button' |
|
111 | 111 | accessKey=".$app_strings['LBL_SAVE_BUTTON_KEY']." class='button primary' |
112 | 112 | onclick=\"this.form.action.value='Save';return check_form('EditView');\" |
113 | 113 | type='submit' name='button' value=".$app_strings['LBL_SAVE_BUTTON_LABEL']." >", |
114 | - "<input title=".$app_strings['LBL_CANCEL_BUTTON_TITLE']." |
|
114 | + "<input title=".$app_strings['LBL_CANCEL_BUTTON_TITLE']." |
|
115 | 115 | class='button cancel_button' accessKey=".$app_strings['LBL_CANCEL_BUTTON_KEY']." |
116 | 116 | type='submit' name='save' value=".$app_strings['LBL_CANCEL_BUTTON_LABEL']." |
117 | 117 | onclick=\"document.EditView.action.value='".$return['action']."';document.EditView.module.value='".$return['module']."';document.EditView.record.value='".$return['record']."';document.EditView.submit();\">", |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | ********************************************************************************/ |
40 | 40 | |
41 | 41 | if(!$GLOBALS['current_user']->isAdminForModule('Users')){ |
42 | - sugar_die('No Access'); |
|
42 | + sugar_die('No Access'); |
|
43 | 43 | } |
44 | 44 | $record = ''; |
45 | 45 | if(isset($_REQUEST['record'])) $record = $_REQUEST['record']; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | echo "</select></form>"; |
68 | 68 | if(!empty($record)){ |
69 | 69 | $hideTeams = true; // to not show the teams subpanel in the following file |
70 | - require_once('modules/ACLRoles/DetailUserRole.php'); |
|
70 | + require_once('modules/ACLRoles/DetailUserRole.php'); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 |
@@ -41,12 +41,12 @@ |
||
41 | 41 | |
42 | 42 | global $mod_strings; |
43 | 43 | $popupMeta = array('moduleMain' => 'ACLRole', |
44 | - 'varName' => 'ROLE', |
|
45 | - 'listTitle' => $mod_strings['LBL_ROLE'], |
|
46 | - 'orderBy' => 'name', |
|
47 | - 'whereClauses' => array('name' => 'acl_roles.name'), |
|
48 | - 'searchInputs' => array('name'), |
|
49 | - 'searchdefs' => array('name' => array('name' => 'name', 'label' => 'LBL_NAME',),) |
|
44 | + 'varName' => 'ROLE', |
|
45 | + 'listTitle' => $mod_strings['LBL_ROLE'], |
|
46 | + 'orderBy' => 'name', |
|
47 | + 'whereClauses' => array('name' => 'acl_roles.name'), |
|
48 | + 'searchInputs' => array('name'), |
|
49 | + 'searchdefs' => array('name' => array('name' => 'name', 'label' => 'LBL_NAME',),) |
|
50 | 50 | ); |
51 | 51 | ?> |
52 | 52 |
@@ -43,17 +43,17 @@ |
||
43 | 43 | * To change the template for this generated file go to |
44 | 44 | * Window - Preferences - PHPeclipse - PHP - Code Templates |
45 | 45 | */ |
46 | - $searchdefs['ACLRoles'] = array( |
|
47 | - 'templateMeta' => array( |
|
48 | - 'maxColumns' => '3', |
|
49 | - 'maxColumnsBasic' => '4', |
|
46 | + $searchdefs['ACLRoles'] = array( |
|
47 | + 'templateMeta' => array( |
|
48 | + 'maxColumns' => '3', |
|
49 | + 'maxColumnsBasic' => '4', |
|
50 | 50 | 'widths' => array('label' => '10', 'field' => '30'), |
51 | - ), |
|
51 | + ), |
|
52 | 52 | 'layout' => array( |
53 | - 'basic_search' => array( |
|
54 | - 'name' => array('name' => 'name', 'label' => 'LBL_NAME',), |
|
55 | - ), |
|
56 | - 'advanced_search' => array(), |
|
57 | - ), |
|
58 | - ); |
|
53 | + 'basic_search' => array( |
|
54 | + 'name' => array('name' => 'name', 'label' => 'LBL_NAME',), |
|
55 | + ), |
|
56 | + 'advanced_search' => array(), |
|
57 | + ), |
|
58 | + ); |
|
59 | 59 | ?> |
@@ -39,7 +39,7 @@ |
||
39 | 39 | ********************************************************************************/ |
40 | 40 | |
41 | 41 | $searchFields['ACLRoles'] = |
42 | - array ( |
|
43 | - 'name' => array( 'query_type'=>'default'), |
|
44 | - ); |
|
42 | + array ( |
|
43 | + 'name' => array( 'query_type'=>'default'), |
|
44 | + ); |
|
45 | 45 | ?> |
@@ -5,11 +5,11 @@ |
||
5 | 5 | 'widths' => array( |
6 | 6 | ), |
7 | 7 | 'includes'=> array( |
8 | - ), |
|
9 | - ), |
|
8 | + ), |
|
9 | + ), |
|
10 | 10 | 'panels' => array( |
11 | 11 | |
12 | - ), |
|
12 | + ), |
|
13 | 13 | |
14 | 14 | |
15 | 15 | ); |
@@ -41,38 +41,38 @@ |
||
41 | 41 | |
42 | 42 | |
43 | 43 | $subpanel_layout = array( |
44 | - 'top_buttons' => array( |
|
45 | - array('widget_class' => 'SubPanelTopCreateButton'), |
|
46 | - array('widget_class' => 'SubPanelTopSelectButton'), |
|
47 | - ), |
|
44 | + 'top_buttons' => array( |
|
45 | + array('widget_class' => 'SubPanelTopCreateButton'), |
|
46 | + array('widget_class' => 'SubPanelTopSelectButton'), |
|
47 | + ), |
|
48 | 48 | |
49 | - 'where' => '', |
|
50 | - 'default_order_by' => '', |
|
49 | + 'where' => '', |
|
50 | + 'default_order_by' => '', |
|
51 | 51 | |
52 | - 'list_fields' => array( |
|
52 | + 'list_fields' => array( |
|
53 | 53 | 'name'=>array( |
54 | - 'vname' => 'LBL_NAME', |
|
55 | - 'widget_class' => 'SubPanelDetailViewLink', |
|
56 | - 'width' => '25%', |
|
57 | - ), |
|
58 | - 'description'=>array( |
|
59 | - 'vname' => 'LBL_DESCRIPTION', |
|
60 | - 'width' => '60%', |
|
61 | - 'sortable'=>false, |
|
62 | - ), |
|
63 | - 'edit_button'=>array( |
|
64 | - 'vname' => 'LBL_EDIT_BUTTON', |
|
65 | - 'widget_class' => 'SubPanelEditButton', |
|
66 | - 'module' => 'Contacts', |
|
67 | - 'width' => '5%', |
|
68 | - ), |
|
69 | - 'remove_button'=>array( |
|
70 | - 'vname' => 'LBL_REMOVE', |
|
71 | - 'widget_class' => 'SubPanelRemoveButton', |
|
72 | - 'module' => 'Contacts', |
|
73 | - 'width' => '5%', |
|
74 | - 'refresh_page'=>true, |
|
75 | - ), |
|
76 | - ), |
|
54 | + 'vname' => 'LBL_NAME', |
|
55 | + 'widget_class' => 'SubPanelDetailViewLink', |
|
56 | + 'width' => '25%', |
|
57 | + ), |
|
58 | + 'description'=>array( |
|
59 | + 'vname' => 'LBL_DESCRIPTION', |
|
60 | + 'width' => '60%', |
|
61 | + 'sortable'=>false, |
|
62 | + ), |
|
63 | + 'edit_button'=>array( |
|
64 | + 'vname' => 'LBL_EDIT_BUTTON', |
|
65 | + 'widget_class' => 'SubPanelEditButton', |
|
66 | + 'module' => 'Contacts', |
|
67 | + 'width' => '5%', |
|
68 | + ), |
|
69 | + 'remove_button'=>array( |
|
70 | + 'vname' => 'LBL_REMOVE', |
|
71 | + 'widget_class' => 'SubPanelRemoveButton', |
|
72 | + 'module' => 'Contacts', |
|
73 | + 'width' => '5%', |
|
74 | + 'refresh_page'=>true, |
|
75 | + ), |
|
76 | + ), |
|
77 | 77 | ); |
78 | 78 | ?> |
79 | 79 | \ No newline at end of file |
@@ -41,24 +41,24 @@ discard block |
||
41 | 41 | |
42 | 42 | |
43 | 43 | $subpanel_layout = array( |
44 | - 'top_buttons' => array( |
|
45 | - array('widget_class' => 'SubPanelTopCreateButton'), |
|
46 | - array('widget_class' => 'SubPanelTopSelectButton'), |
|
47 | - ), |
|
44 | + 'top_buttons' => array( |
|
45 | + array('widget_class' => 'SubPanelTopCreateButton'), |
|
46 | + array('widget_class' => 'SubPanelTopSelectButton'), |
|
47 | + ), |
|
48 | 48 | |
49 | - 'where' => '', |
|
49 | + 'where' => '', |
|
50 | 50 | |
51 | 51 | |
52 | - 'list_fields' => array( |
|
52 | + 'list_fields' => array( |
|
53 | 53 | 'name'=>array( |
54 | - 'vname' => 'LBL_NAME', |
|
55 | - 'width' => '25%', |
|
56 | - ), |
|
57 | - 'description'=>array( |
|
58 | - 'vname' => 'LBL_DESCRIPTION', |
|
59 | - 'width' => '70%', |
|
60 | - 'sortable'=>false, |
|
61 | - ), |
|
54 | + 'vname' => 'LBL_NAME', |
|
55 | + 'width' => '25%', |
|
56 | + ), |
|
57 | + 'description'=>array( |
|
58 | + 'vname' => 'LBL_DESCRIPTION', |
|
59 | + 'width' => '70%', |
|
60 | + 'sortable'=>false, |
|
61 | + ), |
|
62 | 62 | /* |
63 | 63 | 'edit_button'=>array( |
64 | 64 | 'vname' => 'LBL_EDIT_BUTTON', |
@@ -75,6 +75,6 @@ discard block |
||
75 | 75 | ), |
76 | 76 | */ |
77 | 77 | |
78 | - ), |
|
78 | + ), |
|
79 | 79 | ); |
80 | 80 | ?> |
81 | 81 | \ No newline at end of file |
@@ -44,30 +44,30 @@ |
||
44 | 44 | $role = new ACLRole(); |
45 | 45 | if(isset($_REQUEST['record']))$role->id = $_POST['record']; |
46 | 46 | if(!empty($_REQUEST['name'])){ |
47 | - $role->name = $_POST['name']; |
|
48 | - $role->description = $_POST['description']; |
|
49 | - $role->save(); |
|
50 | - //if duplicate |
|
51 | - if(isset($_REQUEST['isduplicate']) && !empty($_REQUEST['isduplicate'])){ |
|
52 | - //duplicate actions |
|
53 | - $role_actions=$role->getRoleActions($_REQUEST['isduplicate']); |
|
54 | - foreach($role_actions as $module){ |
|
55 | - foreach($module as $type){ |
|
56 | - foreach($type as $act){ |
|
57 | - $role->setAction($role->id, $act['id'], $act['aclaccess']); |
|
58 | - } |
|
59 | - } |
|
60 | - } |
|
61 | - } |
|
47 | + $role->name = $_POST['name']; |
|
48 | + $role->description = $_POST['description']; |
|
49 | + $role->save(); |
|
50 | + //if duplicate |
|
51 | + if(isset($_REQUEST['isduplicate']) && !empty($_REQUEST['isduplicate'])){ |
|
52 | + //duplicate actions |
|
53 | + $role_actions=$role->getRoleActions($_REQUEST['isduplicate']); |
|
54 | + foreach($role_actions as $module){ |
|
55 | + foreach($module as $type){ |
|
56 | + foreach($type as $act){ |
|
57 | + $role->setAction($role->id, $act['id'], $act['aclaccess']); |
|
58 | + } |
|
59 | + } |
|
60 | + } |
|
61 | + } |
|
62 | 62 | }else{ |
63 | 63 | ob_clean(); |
64 | 64 | $flc_module = 'All'; |
65 | 65 | foreach($_POST as $name=>$value){ |
66 | - if(substr_count($name, 'act_guid') > 0){ |
|
67 | - $name = str_replace('act_guid', '', $name); |
|
66 | + if(substr_count($name, 'act_guid') > 0){ |
|
67 | + $name = str_replace('act_guid', '', $name); |
|
68 | 68 | |
69 | - $role->setAction($role->id,$name, $value); |
|
70 | - } |
|
69 | + $role->setAction($role->id,$name, $value); |
|
70 | + } |
|
71 | 71 | |
72 | 72 | } |
73 | 73 | echo "result = {role_id:'$role->id', module:'$flc_module'}"; |