Use grouped_timezones consistently across the app controllers

This commit is contained in:
Alex Tselegidis 2022-03-29 10:16:07 +02:00
parent 669aa2f6c6
commit efc532664a
11 changed files with 12 additions and 11 deletions

View file

@ -71,7 +71,7 @@ class Account extends EA_Controller {
'page_title' => lang('settings'), 'page_title' => lang('settings'),
'active_menu' => PRIV_SYSTEM_SETTINGS, 'active_menu' => PRIV_SYSTEM_SETTINGS,
'user_display_name' => $this->accounts->get_user_display_name($user_id), 'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_grouped_array(), 'grouped_timezones' => $this->timezones->to_grouped_array(),
]); ]);
$this->load->view('pages/account'); $this->load->view('pages/account');

View file

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

View file

@ -92,7 +92,8 @@ class Customers extends EA_Controller {
'page_title' => lang('customers'), 'page_title' => lang('customers'),
'active_menu' => PRIV_CUSTOMERS, 'active_menu' => PRIV_CUSTOMERS,
'user_display_name' => $this->accounts->get_user_display_name($user_id), 'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_grouped_array(), 'timezones' => $this->timezones->to_array(),
'grouped_timezones' => $this->timezones->to_grouped_array(),
'privileges' => $this->roles_model->get_permissions_by_slug($role_slug), 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
'require_first_name' => $require_first_name, 'require_first_name' => $require_first_name,
'require_last_name' => $require_last_name, 'require_last_name' => $require_last_name,

View file

@ -83,7 +83,7 @@ class Providers extends EA_Controller {
'page_title' => lang('providers'), 'page_title' => lang('providers'),
'active_menu' => PRIV_USERS, 'active_menu' => PRIV_USERS,
'user_display_name' => $this->accounts->get_user_display_name($user_id), 'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_grouped_array(), 'grouped_timezones' => $this->timezones->to_grouped_array(),
'privileges' => $this->roles_model->get_permissions_by_slug($role_slug), 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
'services' => $this->services_model->get(), 'services' => $this->services_model->get(),
]); ]);

View file

@ -83,7 +83,7 @@ class Secretaries extends EA_Controller {
'page_title' => lang('secretaries'), 'page_title' => lang('secretaries'),
'active_menu' => PRIV_USERS, 'active_menu' => PRIV_USERS,
'user_display_name' => $this->accounts->get_user_display_name($user_id), 'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_grouped_array(), 'grouped_timezones' => $this->timezones->to_grouped_array(),
'privileges' => $this->roles_model->get_permissions_by_slug($role_slug), 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
'providers' => $this->providers_model->get(), 'providers' => $this->providers_model->get(),
]); ]);

View file

@ -22,7 +22,7 @@
<label for="select-timezone"><?= lang('timezone') ?></label> <label for="select-timezone"><?= lang('timezone') ?></label>
<?php component('timezone_dropdown', [ <?php component('timezone_dropdown', [
'attributes' => 'id="select-timezone" class="form-control" value="UTC"', 'attributes' => 'id="select-timezone" class="form-control" value="UTC"',
'timezones' => $grouped_timezones 'grouped_timezones' => $grouped_timezones
]) ?> ]) ?>
</div> </div>

View file

@ -138,7 +138,7 @@
</label> </label>
<?php component('timezone_dropdown', [ <?php component('timezone_dropdown', [
'attributes' => 'id="timezone" class="form-control required"', 'attributes' => 'id="timezone" class="form-control required"',
'timezones' => vars('timezones') 'grouped_timezones' => vars('grouped_timezones')
]) ?> ]) ?>
</div> </div>

View file

@ -178,7 +178,7 @@
</label> </label>
<?php component('timezone_dropdown', [ <?php component('timezone_dropdown', [
'attributes' => 'id="timezone" class="form-control required" disabled', 'attributes' => 'id="timezone" class="form-control required" disabled',
'timezones' => vars('timezones') 'grouped_timezones' => vars('grouped_timezones')
]) ?> ]) ?>
</div> </div>

View file

@ -162,7 +162,7 @@
</label> </label>
<?php component('timezone_dropdown', [ <?php component('timezone_dropdown', [
'attributes' => 'id="timezone" class="form-control required" disabled', 'attributes' => 'id="timezone" class="form-control required" disabled',
'timezones' => vars('timezones') 'grouped_timezones' => vars('grouped_timezones')
]) ?> ]) ?>
</div> </div>

View file

@ -214,7 +214,7 @@
</label> </label>
<?php component('timezone_dropdown', [ <?php component('timezone_dropdown', [
'attributes' => 'id="timezone" class="form-control required" disabled', 'attributes' => 'id="timezone" class="form-control required" disabled',
'timezones' => vars('timezones') 'grouped_timezones' => vars('grouped_timezones')
]) ?> ]) ?>
</div> </div>

View file

@ -177,7 +177,7 @@
</label> </label>
<?php component('timezone_dropdown', [ <?php component('timezone_dropdown', [
'attributes' => 'id="timezone" class="form-control required" disabled', 'attributes' => 'id="timezone" class="form-control required" disabled',
'timezones' => vars('timezones') 'grouped_timezones' => vars('grouped_timezones')
]) ?> ]) ?>
</div> </div>