2020-04-22 22:48:56 +03:00
|
|
|
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
2020-03-29 15:05:34 +03:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
|
|
|
*
|
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
|
|
|
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.4.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the HTML output of a timezone dropdown element.
|
|
|
|
*
|
|
|
|
* @param string $attributes HTML element attributes of the dropdown.
|
2020-12-05 12:55:20 +03:00
|
|
|
*
|
|
|
|
* @return string
|
2020-03-29 15:05:34 +03:00
|
|
|
*/
|
|
|
|
function render_timezone_dropdown($attributes = '')
|
|
|
|
{
|
2020-12-02 23:08:49 +03:00
|
|
|
$CI = get_instance();
|
2020-03-29 15:05:34 +03:00
|
|
|
|
2020-12-02 23:08:49 +03:00
|
|
|
$CI->load->library('timezones');
|
2020-03-29 15:05:34 +03:00
|
|
|
|
2020-12-02 23:08:49 +03:00
|
|
|
$timezones = $CI->timezones->to_grouped_array();
|
2020-03-29 15:05:34 +03:00
|
|
|
|
2020-12-05 12:16:07 +03:00
|
|
|
return $CI->load->view('partials/timezone_dropdown', [
|
2020-12-02 23:08:49 +03:00
|
|
|
'timezones' => $timezones,
|
|
|
|
'attributes' => $attributes
|
|
|
|
], TRUE);
|
2020-03-29 15:05:34 +03:00
|
|
|
}
|