Admin dashboard';
+ }
echo '
' . get_string("header.hello", ['display_name' => get_user_display_name($_SESSION['id'])]) . '
';
echo '
' . get_string('page.dashboard') . '';
echo '
';
diff --git a/views/settings_region.php b/views/settings_region.php
index b88e235..1a097ba 100644
--- a/views/settings_region.php
+++ b/views/settings_region.php
@@ -3,8 +3,17 @@
function update_language(): void
{
global $user;
+ if (is_null($user)) {
+ $user['id'] = DEMO_USER;
+ }
set_user_language($_POST['lang'], $user['id']);
- location('/settings/region');
+ location('/settings/region?success=true');
+}
+
+if (array_key_exists('success', $query)) {
+ if ($query['success'] == 'true') {
+ flash(get_string('generic.languageUpdated'), $flash);
+ }
}
if (isset($path[3])) {
@@ -37,11 +46,16 @@ if (isset($path[3])) {
= get_string('page.settings'); ?>
-
+
= get_string('settings.region') ?>
Here you can set the language ByeCorps ID is displayed in.