PluginProbe
VikBooking Hotel Booking Engine & PMS / trunk
VikBooking Hotel Booking Engine & PMS vtrunk
1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 All 36 releases
vikbooking / admin / layouts / reports / report / settings.php

settings.php in VikBooking Hotel Booking Engine & PMS trunk, at admin/layouts/reports/report/settings.php

89 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package VikBooking
4 * @subpackage com_vikbooking
5 * @author Alessio Gaggii - E4J srl
6 * @copyright Copyright (C) 2024 E4J srl. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 * @link https://vikwp.com
9 */
10
11 defined('ABSPATH') or die('No script kiddies please!');
12
13 /**
14 * Obtain vars from arguments received in the layout file.
15 * This layout file should be called once at most per page.
16 *
17 * @var string $report The report file name (identifier).
18 * @var array $fields List of setting fields to render.
19 * @var array $settings List of current report settings.
20 * @var object $instance The report object instance.
21 */
22 extract($displayData);
23
24 ?>
25 <form action="#save-report-settings" method="post" name="vbo-report-custom-settings" id="vbo-report-custom-settings-form">
26
27 <input type="hidden" name="report" value="<?php echo $report; ?>" />
28
29 <div class="vbo-admin-container vbo-admin-container-full vbo-admin-container-compact">
30 <div class="vbo-params-wrap">
31 <div class="vbo-params-container">
32
33 <?php
34 /**
35 * Handle multiple report profile settings.
36 *
37 * @since 1.17.7 (J) - 1.7.7 (WP)
38 */
39 if ($instance->allowsProfileSettings()) {
40 // load all the existing profiles
41 $report_profiles = $instance->getSettingProfiles();
42
43 // load the active profile
44 $active_profile = $instance->getActiveProfile();
45
46 // get the active profile name
47 $profile_name = $active_profile ? ($report_profiles[$active_profile] ?? JText::translate('VBO_USE_DEFAULT')) : JText::translate('VBO_USE_DEFAULT');
48
49 ?>
50 <div class="vbo-params-block">
51
52 <div class="vbo-param-container">
53 <div class="vbo-param-label"><?php echo JText::translate('VBO_PROFILE_SETTINGS'); ?></div>
54 <div class="vbo-param-setting">
55 <select name="_profile" onchange="VBOCore.emitEvent('vbo-report-settings-profile-changed', {value: this.value});">
56 <option value="<?php echo JHtml::fetch('esc_attr', $active_profile); ?>"><?php echo $profile_name; ?></option>
57 <option value="_new"><?php echo JText::translate('VBO_PROFILE_NEW'); ?></option>
58 </select>
59 <span class="vbo-param-setting-comment"><?php echo JText::translate('VBO_PROFILE_SETTINGS_HELP'); ?></span>
60 </div>
61 </div>
62
63 <div class="vbo-param-container" data-profile="_new" style="display: none;">
64 <div class="vbo-param-label"><?php echo JText::translate('VBO_PROFILE_NAME'); ?></div>
65 <div class="vbo-param-setting">
66 <input type="text" name="_newprofile" value="" maxlength="64" />
67 </div>
68 </div>
69
70 </div>
71 <?php
72 }
73 ?>
74
75 <div class="vbo-params-block">
76
77 <?php
78 // render the report custom settings
79 echo VBOParamsRendering::getInstance($fields, (array) $settings)->setInputName('data')->getHtml();
80 ?>
81
82 </div>
83
84 </div>
85 </div>
86 </div>
87
88 </form>
89