PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / trunk
VikAppointments Services Booking Calendar vtrunk
trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / exportres / tmpl / default_details.php
vikappointments / admin / views / exportres / tmpl Last commit date
default.php 4 years ago default_details.php 2 years ago default_params.php 4 years ago index.html 7 years ago
default_details.php
105 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 $vik = VAPApplication::getInstance();
15
16 ?>
17
18 <!-- NAME - Text -->
19
20 <?php echo $vik->openControl(JText::translate('VAPEXPORTRES1')); ?>
21 <input type="text" name="filename" value="" size="32" />
22 <?php echo $vik->closeControl(); ?>
23
24 <!-- EXPORT CLASS - Select -->
25
26 <?php
27 $elements = array();
28 $elements[] = JHtml::fetch('select.option', '', '');
29
30 foreach ($this->drivers as $k => $v)
31 {
32 $elements[] = JHtml::fetch('select.option', $k, $v);
33 }
34
35 echo $vik->openControl(JText::translate('VAPEXPORTRES2') . '*'); ?>
36 <select name="driver" class="required" id="vap-driver-sel">
37 <?php echo JHtml::fetch('select.options', $elements); ?>
38 </select>
39 <?php echo $vik->closeControl(); ?>
40
41 <!-- DATE FROM - Calendar -->
42
43 <?php
44 echo $vik->openControl(JText::translate('VAPEXPORTRES3'));
45 echo $vik->calendar($this->data->fromdate, 'fromdate', 'vap-date-from');
46 echo $vik->closeControl();
47 ?>
48
49 <!-- DATE TO - Calendar -->
50
51 <?php
52 echo $vik->openControl(JText::translate('VAPEXPORTRES4'));
53 echo $vik->calendar($this->data->todate, 'todate', 'vap-date-to');
54 echo $vik->closeControl();
55 ?>
56
57 <!-- EMPLOYEE - Select -->
58
59 <?php
60 if ($this->data->type == 'appointment')
61 {
62 echo $vik->openControl(JText::translate('VAPEXPORTRES5'));
63
64 // load employees and group them
65 $options = JHtml::fetch('vaphtml.admin.employees', $strict = false, $blank = '', $group = true);
66
67 // create dropdown attributes
68 $params = array(
69 'id' => 'vap-employees-sel',
70 'group.items' => null,
71 'list.select' => $this->data->id_employee,
72 );
73
74 // render select
75 echo JHtml::fetch('select.groupedList', $options, 'id_employee', $params);
76
77 echo $vik->closeControl();
78 }
79 ?>
80
81 <?php
82 JText::script('VAPFILTERSELECTFILE');
83 JText::script('VAPFILTERSELECTEMPLOYEE');
84 ?>
85
86 <script>
87
88 jQuery(function($) {
89
90 $('#vap-driver-sel').select2({
91 placeholder: Joomla.JText._('VAPFILTERSELECTFILE'),
92 allowClear: false,
93 width: '90%',
94 });
95
96 $('#vap-employees-sel').select2({
97 placeholder: Joomla.JText._('VAPFILTERSELECTEMPLOYEE'),
98 allowClear: true,
99 width: '90%',
100 });
101
102 });
103
104 </script>
105