default.php
3 days ago
default_details.php
3 days ago
default_details_appearance.php
3 days ago
default_details_params.php
3 days ago
default_details_payment.php
3 days ago
default_details_publishing.php
3 days ago
default_notes.php
3 days ago
index.html
3 days ago
default_notes.php
143 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 | $payment = $this->payment; |
| 15 | |
| 16 | $vik = VAPApplication::getInstance(); |
| 17 | |
| 18 | $editor = $vik->getEditor(); |
| 19 | |
| 20 | /** |
| 21 | * Trigger event to display custom HTML. |
| 22 | * In case it is needed to include any additional fields, |
| 23 | * it is possible to create a plugin and attach it to an event |
| 24 | * called "onDisplayViewPaymentNotes". |
| 25 | * The event method receives the view instance as argument. |
| 26 | * |
| 27 | * @since 1.7 |
| 28 | */ |
| 29 | $notesForms = $this->onDisplayView('Notes'); |
| 30 | |
| 31 | ?> |
| 32 | |
| 33 | <!-- Define role to detect the supported hook --> |
| 34 | <!-- {"rule":"customizer","event":"onDisplayViewPaymentNotes","type":"fieldset"} --> |
| 35 | |
| 36 | <?php |
| 37 | /** |
| 38 | * Iterate remaining forms to be displayed within |
| 39 | * the Notes tab (at the beginning). |
| 40 | * |
| 41 | * @since 1.7 |
| 42 | */ |
| 43 | foreach ($notesForms as $formName => $formHtml) |
| 44 | { |
| 45 | $title = JText::translate($formName); |
| 46 | ?> |
| 47 | <div class="row-fluid"> |
| 48 | <div class="span12"> |
| 49 | <?php |
| 50 | echo $vik->openFieldset($title); |
| 51 | echo $formHtml; |
| 52 | echo $vik->closeFieldset(); |
| 53 | ?> |
| 54 | </div> |
| 55 | </div> |
| 56 | <?php |
| 57 | } |
| 58 | ?> |
| 59 | |
| 60 | <div class="row-fluid"> |
| 61 | |
| 62 | <!-- LEFT SIDE --> |
| 63 | |
| 64 | <div class="span6"> |
| 65 | |
| 66 | <!-- NOTES BEFORE PURCHASE --> |
| 67 | |
| 68 | <div class="row-fluid"> |
| 69 | <div class="span12"> |
| 70 | <?php |
| 71 | echo $vik->openFieldset(JText::translate('VAPMANAGEPAYMENT13')); |
| 72 | echo $editor->display('prenote', $payment->prenote, '100%', 550, 70, 20); |
| 73 | ?> |
| 74 | |
| 75 | <!-- Define role to detect the supported hook --> |
| 76 | <!-- {"rule":"customizer","event":"onDisplayViewPayment","key":"prenote","type":"field"} --> |
| 77 | |
| 78 | <?php |
| 79 | /** |
| 80 | * Look for any additional fields to be pushed within |
| 81 | * the "Notes before purchase" fieldset (left-side). |
| 82 | * |
| 83 | * NOTE: retrieved from "onDisplayViewPayment" hook. |
| 84 | * |
| 85 | * @since 1.7 |
| 86 | */ |
| 87 | if (isset($this->forms['prenote'])) |
| 88 | { |
| 89 | echo $this->forms['prenote']; |
| 90 | |
| 91 | // unset details form to avoid displaying it twice |
| 92 | unset($this->forms['prenote']); |
| 93 | } |
| 94 | |
| 95 | echo $vik->closeFieldset(); |
| 96 | ?> |
| 97 | </div> |
| 98 | </div> |
| 99 | |
| 100 | </div> |
| 101 | |
| 102 | <!-- RIGHT SIDE --> |
| 103 | |
| 104 | <div class="span6"> |
| 105 | |
| 106 | <!-- NOTES AFTER PURCHASE --> |
| 107 | |
| 108 | <div class="row-fluid"> |
| 109 | <div class="span12"> |
| 110 | <?php |
| 111 | echo $vik->openFieldset(JText::translate('VAPMANAGEPAYMENT14')); |
| 112 | echo $editor->display('note', $payment->note, '100%', 550, 70, 20); |
| 113 | ?> |
| 114 | |
| 115 | <!-- Define role to detect the supported hook --> |
| 116 | <!-- {"rule":"customizer","event":"onDisplayViewPayment","key":"note","type":"field"} --> |
| 117 | |
| 118 | <?php |
| 119 | /** |
| 120 | * Look for any additional fields to be pushed within |
| 121 | * the "Notes after purchase" fieldset (right-side). |
| 122 | * |
| 123 | * NOTE: retrieved from "onDisplayViewPayment" hook. |
| 124 | * |
| 125 | * @since 1.7 |
| 126 | */ |
| 127 | if (isset($this->forms['note'])) |
| 128 | { |
| 129 | echo $this->forms['note']; |
| 130 | |
| 131 | // unset details form to avoid displaying it twice |
| 132 | unset($this->forms['note']); |
| 133 | } |
| 134 | |
| 135 | echo $vik->closeFieldset(); |
| 136 | ?> |
| 137 | </div> |
| 138 | </div> |
| 139 | |
| 140 | </div> |
| 141 | |
| 142 | </div> |
| 143 |