Skip to content

Commit

Permalink
System: fix localization of role names in the sidebar Role Selector (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AbbadiAhmad authored Feb 3, 2025
1 parent 98c130d commit 695b291
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ v29.0.00


Bug Fixes
Sidebar: fixed localization of Roles menu items.
Activities: fixed activity missing from the timetable if it doesn't have a category
Activities: fixed missing registration button for parents on View Activities page
System Admin: fixed field validation for Student Default Email in Form Builder
Expand Down
6 changes: 5 additions & 1 deletion src/UI/Components/Sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,13 @@ public function getOutput()
$form->addHiddenValue('address', $this->session->get('address'));

$roles = $this->session->get('gibbonRoleIDAll', []);
$roles_array = array_combine(array_column($roles, 0), array_column($roles, 1));
foreach($roles_array as $index=>$role){
$roles_array[$index] = __($role);
}
$row = $form->addRow()->addClass('flex');
$row->addSelect('gibbonRoleID')
->fromArray(array_combine(array_column($roles, 0), array_column($roles, 1)))
->fromArray($roles_array)
->placeholder(null)
->addClass('flex-grow')
->groupAlign('left')
Expand Down

0 comments on commit 695b291

Please sign in to comment.