PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.20
VikAppointments Services Booking Calendar v1.2.20
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / caldays / tmpl / default.php
vikappointments / admin / views / caldays / tmpl Last commit date
default.php 1 month ago default_calendar.php 1 month ago default_create_modal.php 1 month ago default_day.php 1 month ago default_filterbar.php 1 month ago default_modal.php 1 month ago default_sidebar.php 1 month ago index.html 1 month ago
default.php
123 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 /**
15 * It seems that Joomla stopped loading JS core for
16 * the views loaded with tmpl component. We need to force
17 * it to let the pagination accessing Joomla object.
18 *
19 * @since Joomla 3.8.7
20 */
21 JHtml::fetch('behavior.core');
22
23 JHtml::fetch('vaphtml.assets.colorpicker');
24
25 $vik = VAPApplication::getInstance();
26
27 ?>
28
29 <form action="index.php" method="post" name="adminForm" id="adminForm">
30
31 <?php
32 // load filter bar
33 echo $this->loadTemplate('filterbar');
34 ?>
35
36 <?php echo $vik->openCard('employee_workdays'); ?>
37
38 <div class="span8" style="margin-left: 0px;">
39 <?php
40 if ($this->filters['layout'] == 'day')
41 {
42 // load day contents
43 echo $this->loadTemplate('day');
44 }
45 else
46 {
47 // load calendar content
48 echo $this->loadTemplate('calendar');
49 }
50 ?>
51 </div>
52
53 <div class="span4" class="cal-sidebar">
54 <?php
55 // load sidebar content
56 echo $this->loadTemplate('sidebar');
57 ?>
58 </div>
59
60 <?php echo $vik->closeCard(); ?>
61
62 <?php echo JHtml::fetch('form.token'); ?>
63
64 <input type="hidden" name="mode" value="<?php echo $this->filters['layout']; ?>" />
65 <input type="hidden" name="task" value="" />
66 <input type="hidden" name="view" value="caldays" />
67 <input type="hidden" name="option" value="com_vikappointments" />
68 </form>
69
70 <?php
71 // load modal content
72 echo $this->loadTemplate('modal');
73
74 /**
75 * Render inspector to create new appointments.
76 *
77 * @since 1.7.4 Changed from modal because on J4 there is a conflict with select2
78 */
79 echo JHtml::fetch(
80 'vaphtml.inspector.render',
81 'newapp-inspector',
82 array(
83 'title' => JText::translate('VAPMAINTITLENEWRESERVATION'),
84 'closeButton' => true,
85 'keyboard' => true,
86 'footer' => '<button type="button" class="btn btn-success" data-role="reservation.create">' . JText::translate('VAPNEW') . '</button>',
87 'width' => 400,
88 ),
89 $this->loadTemplate('create_modal')
90 );
91 ?>
92
93 <script>
94
95 Joomla.submitbutton = function(task) {
96 if (task == 'backToCal') {
97 // unset form data to retrieve the values stored in the user state
98 document.adminForm.date.remove();
99
100 document.adminForm.mode.value = '';
101 task = 'caldays';
102 } else if (task == 'reportsemp') {
103 // Include employee ID for being used by reports view.
104 // Include from=calendar in order to return to this view when exiting from reports view.
105 jQuery('#adminForm').append(
106 '<input type="hidden" name="cid[]" value="<?php echo $this->filters['employee']; ?>" />\n' +
107 '<input type="hidden" name="from" value="caldays" />\n'
108 );
109
110 document.adminForm.task.value = '';
111 document.adminForm.view.value = 'reportsemp';
112 task = '';
113 }
114
115 Joomla.submitform(task, document.adminForm);
116 }
117
118 function vapOpenJModal(id, url, jqmodal) {
119 <?php echo $vik->bootOpenModalJS(); ?>
120 }
121
122 </script>
123