PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 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 All 37 releases
← All changes | admin/views/editorder/tmpl/default.php +48 -1 1.8.15 → 1.8.16 View file →
@@ -15,8 +15,10 @@
15 15 $busy = $this->busy;
16 16 $customer = $this->customer;
17 17 $payments = $this->payments;
18 18
19 +// load registry and history
20 +$registry = VBOBookingRegistry::getInstance($this->row, $this->rooms);
19 21 $history_obj = VikBooking::getBookingHistoryInstance($row['id']);
20 22
21 23 // availability helper
22 24 $av_helper = VikBooking::getAvailabilityInstance();
@@ -223,9 +225,8 @@
223 225 * @since 1.18.8 (J) - 1.8.8 (WP)
224 226 */
225 227 $messagingAccountConfigurations = [];
226 228 if (class_exists('VCMMessagingAccountsModel')) {
227 - $registry = VBOBookingRegistry::getInstance($this->row, $this->rooms);
228 229 $messagingAccountConfigurations = VCMMessagingAccountsModel::getInstance()->getConfigurationsData(
229 230 new VCMMessagingTemplateDecoratorBooking($registry),
230 231 [
231 232 'listings' => $registry->getBookedListingIds(),
@@ -1327,8 +1328,15 @@
1327 1328 * @since 1.18.0 (J) - 1.8.0 (WP)
1328 1329 */
1329 1330 $taskManager = VBOFactory::getTaskManager();
1330 1331 $bookingTasks = VBOTaskModelTask::getInstance()->filterItems(['id_order' => $row['id']]);
1332 +
1333 + /**
1334 + * Check if the booking should have had passcodes generated.
1335 + *
1336 + * @since 1.18.16 (J) - 1.8.16 (WP)
1337 + */
1338 + $shouldHavePasscodes = !$history_obj->hasEvent(['ND', 'MD']) && VBOFactory::getDoorAccessControl()->shouldBookingHavePasscodes($registry);
1331 1339 ?>
1332 1340
1333 1341 <div class="vbo-bookingdet-tab-cont" id="vbo-tab-details" style="display: block;">
1334 1342 <div class="vbo-bookingdet-innercontainer">
@@ -1375,8 +1383,20 @@
1375 1383 </div>
1376 1384 </div>
1377 1385 <?php
1378 1386 }
1387 + if ($shouldHavePasscodes) {
1388 + ?>
1389 + <div class="vbo-bookingdet-detcont vbo-bookingdet-detcont-dac vbo-hidein-print">
1390 + <div class="vbo-bookingdet-lblcont">
1391 + <label><?php echo JText::translate('VBO_W_DOORACCESSCONTROL_TITLE'); ?></label>
1392 + </div>
1393 + <div class="vbo-bookingdet-inpwrap vbo-bookingdet-dac-gen">
1394 + <a href="<?php echo VBOFactory::getPlatform()->getUri()->addCSRF('index.php?option=com_vikbooking&task=bookings.generatePasscodes&bid=' . $row['id']); ?>" class="btn"><?php echo JText::translate('VBO_CREATE_PASSCODE'); ?></a>
1395 + </div>
1396 + </div>
1397 + <?php
1398 + }
1379 1399 ?>
1380 1400 <div class="vbo-bookingdet-detcont<?php echo $row['closure'] > 0 ? ' vbo-bookingdet-closure' : ''; ?>">
1381 1401 <?php
1382 1402 $custdata_parts = explode("\n", $row['custdata']);
@@ -1755,8 +1775,35 @@
1755 1775 }
1756 1776 ?>
1757 1777
1758 1778 </div>
1779 + <?php
1780 + if ($phoneAlias = $registry->getAliasPhoneNumber()) {
1781 + ?>
1782 + <div class="vbo-bookingdet-detcont vbo-hidein-print">
1783 + <div class="vbo-bookingdet-lblcont">
1784 + <label for="phone_alias"><?php VikBookingIcons::e('user-shield'); ?> <?php echo JText::translate('VBO_PHONE_ALIAS'); ?></label>
1785 + </div>
1786 + <div class="vbo-bookingdet-inpwrap">
1787 + <div class="vbo-bookingdet-inpcont">
1788 + <input type="text" id="phone_alias" value="<?php echo $this->escape($phoneAlias); ?>" readonly />
1789 + </div>
1790 + <span class="vbo-param-setting-comment"><?php echo JText::translate('VBO_PHONE_ALIAS_HELP'); ?></span>
1791 + </div>
1792 +
1793 + <!-- Define role to detect the supported hook -->
1794 + <!-- {"rule":"customizer","event":"onDisplayViewVikBookingEditorderSidebar","key":"phone_alias","type":"field"} -->
1795 +
1796 + <?php
1797 + if (isset($bookingSidebarForms['phone_alias'])) {
1798 + echo $bookingSidebarForms['phone_alias'];
1799 + }
1800 + ?>
1801 +
1802 + </div>
1803 + <?php
1804 + }
1805 + ?>
1759 1806
1760 1807 <!-- Define role to detect the supported hook -->
1761 1808 <!-- {"rule":"customizer","event":"onDisplayViewVikBookingEditorderSidebar","type":"fieldset"} -->
1762 1809