PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / editconfig / tmpl / default_global_timezone.php
vikappointments / admin / views / editconfig / tmpl Last commit date
default.php 4 days ago default_currency.php 4 days ago default_currency_details.php 4 days ago default_currency_providers.php 4 days ago default_email.php 4 days ago default_email_attachments.php 4 days ago default_email_mail.php 4 days ago default_email_notifications.php 4 days ago default_email_template.php 4 days ago default_global.php 4 days ago default_global_calendars.php 4 days ago default_global_columns.php 4 days ago default_global_gdpr.php 4 days ago default_global_sync.php 4 days ago default_global_system.php 4 days ago default_global_timezone.php 4 days ago default_global_zip.php 4 days ago default_listings.php 4 days ago default_listings_employees.php 4 days ago default_listings_services.php 4 days ago default_shop.php 4 days ago default_shop_details.php 4 days ago default_shop_invoice.php 4 days ago default_shop_packages.php 4 days ago default_shop_recurrence.php 4 days ago default_shop_reviews.php 4 days ago default_shop_subscriptions.php 4 days ago default_shop_waitlist.php 4 days ago index.html 4 days ago
default_global_timezone.php
118 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 $params = $this->params;
15
16 $vik = VAPApplication::getInstance();
17
18 /**
19 * Trigger event to display custom HTML.
20 * In case it is needed to include any additional fields,
21 * it is possible to create a plugin and attach it to an event
22 * called "onDisplayViewConfigGlobalTimezone". The event method
23 * receives the view instance as argument.
24 *
25 * @since 1.7
26 */
27 $forms = $this->onDisplayView('GlobalTimezone');
28
29 ?>
30
31 <div class="config-fieldset">
32
33 <div class="config-fieldset-body">
34
35 <!-- MULTI TIMEZONE - Checkbox -->
36
37 <?php
38 $yes = $vik->initRadioElement('', '', $params['multitimezone'] == 1);
39 $no = $vik->initRadioElement('', '', $params['multitimezone'] == 0);
40
41 $help = $vik->createPopover(array(
42 'title' => JText::translate('VAPMANAGECONFIG86'),
43 'content' => JText::translate('VAPMANAGECONFIG86_DESC'),
44 ));
45
46 echo $vik->openControl(JText::translate('VAPMANAGECONFIG86') . $help);
47 echo $vik->radioYesNo('multitimezone', $yes, $no);
48 echo $vik->closeControl();
49 ?>
50
51 <!-- CURRENT TIMEZONE - Label -->
52
53 <?php
54 $help = $vik->createPopover(array(
55 'title' => JText::translate('VAPMANAGECONFIG87'),
56 'content' => JText::sprintf('VAPMANAGECONFIG87_DESC', JFactory::getApplication()->get('offset', 'UTC')),
57 ));
58
59 echo $vik->openControl(JText::translate('VAPMANAGECONFIG87') . $help); ?>
60 <span class="badge badge-info">
61 <?php echo str_replace('_', ' ', date_default_timezone_get()); ?>
62 </span>
63
64 <span class="badge badge-important">
65 <?php echo date('Y-m-d H:i:s T'); ?>
66 </span>
67 <?php echo $vik->closeControl(); ?>
68
69 <!-- Define role to detect the supported hook -->
70 <!-- {"rule":"customizer","event":"onDisplayViewConfigGlobalTimezone","key":"basic","type":"field"} -->
71
72 <?php
73 /**
74 * Look for any additional fields to be pushed within
75 * the Global > Timezone > Timezone fieldset.
76 *
77 * @since 1.7
78 */
79 if (isset($forms['basic']))
80 {
81 echo $forms['basic'];
82
83 // unset details form to avoid displaying it twice
84 unset($forms['basic']);
85 }
86 ?>
87
88 </div>
89
90 </div>
91
92 <!-- Define role to detect the supported hook -->
93 <!-- {"rule":"customizer","event":"onDisplayViewConfigGlobalTimezone","type":"fieldset"} -->
94
95 <?php
96 /**
97 * Iterate remaining forms to be displayed as new fieldsets
98 * within the Global > Timezone tab.
99 *
100 * @since 1.7
101 */
102 foreach ($forms as $formTitle => $formHtml)
103 {
104 ?>
105 <div class="config-fieldset">
106
107 <div class="config-fieldset-head">
108 <h3><?php echo JText::translate($formTitle); ?></h3>
109 </div>
110
111 <div class="config-fieldset-body">
112 <?php echo $formHtml; ?>
113 </div>
114
115 </div>
116 <?php
117 }
118