|
9 | 9 | * |
10 | 10 | * Parameters: |
11 | 11 | * |
12 | | - * mode - card : (Default) Show all groups and roles in card view |
| 12 | + * mode - cards : (Default) Show all groups and roles in card view |
13 | 13 | * - permissions : Show permissions of all groups and roles in list view |
14 | 14 | * - edit : Show dialog to create or edit a role. |
15 | 15 | * - save : Save data of role form dialog |
|
36 | 36 | require_once(__DIR__ . '/../../system/common.php'); |
37 | 37 |
|
38 | 38 | // Initialize and check the parameters |
39 | | - $getMode = admFuncVariableIsValid($_GET, 'mode', 'string', array('defaultValue' => 'card', 'validValues' => array('card', 'permissions', 'edit', 'save', 'delete', 'activate', 'deactivate', 'export'))); |
| 39 | + $getMode = admFuncVariableIsValid($_GET, 'mode', 'string', array('defaultValue' => 'cards', 'validValues' => array('cards', 'permissions', 'edit', 'save', 'delete', 'activate', 'deactivate', 'export'))); |
40 | 40 | $getCategoryUUID = admFuncVariableIsValid($_GET, 'cat_uuid', 'uuid'); |
41 | 41 | $getRoleUUID = admFuncVariableIsValid($_GET, 'role_uuid', 'uuid'); |
42 | 42 | $getRoleType = admFuncVariableIsValid($_GET, 'role_type', 'int', array('defaultValue' => 1)); |
|
46 | 46 | throw new Exception('SYS_MODULE_DISABLED'); |
47 | 47 | } |
48 | 48 |
|
49 | | - if ($getMode !== 'card') { |
| 49 | + if ($getMode !== 'cards') { |
50 | 50 | // only users with the special right are allowed to manage roles |
51 | 51 | if (!$gCurrentUser->isAdministratorRoles()) { |
52 | 52 | throw new Exception('SYS_NO_RIGHTS'); |
53 | 53 | } |
54 | 54 | } |
55 | 55 |
|
56 | | - if (in_array($getMode, array('card', 'permissions'))) { |
| 56 | + if (in_array($getMode, array('cards', 'permissions'))) { |
57 | 57 | // set headline |
58 | 58 | switch ($getRoleType) { |
59 | 59 | case GroupsRolesPresenter::ROLE_TYPE_INACTIVE: |
|
85 | 85 | $headline .= ' - ' . $category->getValue('cat_name'); |
86 | 86 | } |
87 | 87 |
|
88 | | - if ($getMode === 'card') { |
| 88 | + if ($getMode === 'cards') { |
89 | 89 | // Navigation of the module starts here |
90 | 90 | $gNavigation->addStartUrl(CURRENT_URL, $headline, 'bi-people-fill'); |
91 | 91 | } else { |
|
117 | 117 | } |
118 | 118 |
|
119 | 119 | switch ($getMode) { |
120 | | - case 'card': |
| 120 | + case 'cards': |
121 | 121 | $groupsRoles->createCards($getCategoryUUID, $getRoleType); |
122 | 122 | $groupsRoles->show(); |
123 | 123 | break; |
|
0 commit comments