Use the component helper for rendering the timezone dropdown in admins page.

This commit is contained in:
Alex Tselegidis 2022-01-18 10:34:53 +01:00
parent 8bc1f49613
commit d2fb826f8f
2 changed files with 4 additions and 2 deletions

View File

@ -70,7 +70,7 @@ class Admins extends EA_Controller {
'page_title' => lang('admins'),
'active_menu' => PRIV_USERS,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_array(),
'timezones' => $this->timezones->to_grouped_array(),
'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
]);

View File

@ -177,7 +177,9 @@
<?= lang('timezone') ?>
<span class="text-danger">*</span>
</label>
<?= render_timezone_dropdown('id="timezone" class="form-control required"') ?>
<?php component('timezone_dropdown', 'id="timezone" class="form-control required"', [
'timezones' => vars('timezones')
]) ?>
</div>
<br>