default.php
2 days ago
default_publishing.php
2 days ago
default_roles.php
2 days ago
default_status.php
2 days ago
index.html
2 days ago
default.php
232 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 | JHtml::fetch('bootstrap.tooltip', '.hasTooltip'); |
| 15 | JHtml::fetch('vaphtml.assets.select2'); |
| 16 | JHtml::fetch('vaphtml.assets.fontawesome'); |
| 17 | |
| 18 | $status = $this->status; |
| 19 | |
| 20 | $vik = VAPApplication::getInstance(); |
| 21 | |
| 22 | /** |
| 23 | * Trigger event to display custom HTML. |
| 24 | * In case it is needed to include any additional fields, |
| 25 | * it is possible to create a plugin and attach it to an event |
| 26 | * called "onDisplayViewStatuscode". The event method receives the |
| 27 | * view instance as argument. |
| 28 | * |
| 29 | * @since 1.7 |
| 30 | */ |
| 31 | $forms = $this->onDisplayView(); |
| 32 | |
| 33 | ?> |
| 34 | |
| 35 | <form name="adminForm" action="index.php" method="post" id="adminForm"> |
| 36 | |
| 37 | <?php echo $vik->openCard(); ?> |
| 38 | |
| 39 | <!-- MAIN --> |
| 40 | |
| 41 | <div class="span7"> |
| 42 | |
| 43 | <!-- STATUS CODE --> |
| 44 | |
| 45 | <div class="row-fluid"> |
| 46 | <div class="span12"> |
| 47 | <?php |
| 48 | echo $vik->openFieldset(JText::translate('VAPMANAGERESERVATION12')); |
| 49 | echo $this->loadTemplate('status'); |
| 50 | ?> |
| 51 | |
| 52 | <!-- Define role to detect the supported hook --> |
| 53 | <!-- {"rule":"customizer","event":"onDisplayViewStatuscode","key":"status","type":"field"} --> |
| 54 | |
| 55 | <?php |
| 56 | /** |
| 57 | * Look for any additional fields to be pushed within |
| 58 | * the "Status" fieldset (left-side). |
| 59 | * |
| 60 | * @since 1.7 |
| 61 | */ |
| 62 | if (isset($forms['status'])) |
| 63 | { |
| 64 | echo $forms['status']; |
| 65 | |
| 66 | // unset details form to avoid displaying it twice |
| 67 | unset($forms['status']); |
| 68 | } |
| 69 | |
| 70 | echo $vik->closeFieldset(); |
| 71 | ?> |
| 72 | </div> |
| 73 | </div> |
| 74 | |
| 75 | <!-- DESCRIPTION --> |
| 76 | |
| 77 | <div class="row-fluid"> |
| 78 | <div class="span12"> |
| 79 | <?php |
| 80 | echo $vik->openFieldset(JText::translate('VAPMANAGEOPTION3')); |
| 81 | echo $vik->getEditor()->display('description', $status->description, '100%', 550, 40, 20); |
| 82 | ?> |
| 83 | |
| 84 | <!-- Define role to detect the supported hook --> |
| 85 | <!-- {"rule":"customizer","event":"onDisplayViewStatuscode","key":"description","type":"field"} --> |
| 86 | |
| 87 | <?php |
| 88 | /** |
| 89 | * Look for any additional fields to be pushed within |
| 90 | * the "Description" fieldset (left-side). |
| 91 | * |
| 92 | * @since 1.7 |
| 93 | */ |
| 94 | if (isset($forms['description'])) |
| 95 | { |
| 96 | echo $forms['description']; |
| 97 | |
| 98 | // unset details form to avoid displaying it twice |
| 99 | unset($forms['description']); |
| 100 | } |
| 101 | |
| 102 | echo $vik->closeFieldset(); |
| 103 | ?> |
| 104 | </div> |
| 105 | </div> |
| 106 | |
| 107 | </div> |
| 108 | |
| 109 | <!-- SIDEBAR --> |
| 110 | |
| 111 | <div class="span5"> |
| 112 | |
| 113 | <!-- ROLES --> |
| 114 | |
| 115 | <div class="row-fluid"> |
| 116 | <div class="span12"> |
| 117 | <?php |
| 118 | echo $vik->openFieldset(JText::translate('VAPSTATUSCODEROLES')); |
| 119 | echo $this->loadTemplate('roles'); |
| 120 | ?> |
| 121 | |
| 122 | <!-- Define role to detect the supported hook --> |
| 123 | <!-- {"rule":"customizer","event":"onDisplayViewStatuscode","key":"roles","type":"field"} --> |
| 124 | |
| 125 | <?php |
| 126 | /** |
| 127 | * Look for any additional fields to be pushed within |
| 128 | * the "Roles" fieldset (sidebar). |
| 129 | * |
| 130 | * @since 1.7 |
| 131 | */ |
| 132 | if (isset($forms['roles'])) |
| 133 | { |
| 134 | echo $forms['roles']; |
| 135 | |
| 136 | // unset details form to avoid displaying it twice |
| 137 | unset($forms['roles']); |
| 138 | } |
| 139 | |
| 140 | echo $vik->closeFieldset(); |
| 141 | ?> |
| 142 | </div> |
| 143 | </div> |
| 144 | |
| 145 | <!-- PUBLISHING --> |
| 146 | |
| 147 | <div class="row-fluid"> |
| 148 | <div class="span12"> |
| 149 | <?php |
| 150 | echo $vik->openFieldset(JText::translate('JGLOBAL_FIELDSET_PUBLISHING')); |
| 151 | echo $this->loadTemplate('publishing'); |
| 152 | ?> |
| 153 | |
| 154 | <!-- Define role to detect the supported hook --> |
| 155 | <!-- {"rule":"customizer","event":"onDisplayViewStatuscode","key":"publishing","type":"field"} --> |
| 156 | |
| 157 | <?php |
| 158 | /** |
| 159 | * Look for any additional fields to be pushed within |
| 160 | * the "Publishing" fieldset (sidebar). |
| 161 | * |
| 162 | * @since 1.7 |
| 163 | */ |
| 164 | if (isset($forms['publishing'])) |
| 165 | { |
| 166 | echo $forms['publishing']; |
| 167 | |
| 168 | // unset details form to avoid displaying it twice |
| 169 | unset($forms['publishing']); |
| 170 | } |
| 171 | |
| 172 | echo $vik->closeFieldset(); |
| 173 | ?> |
| 174 | </div> |
| 175 | </div> |
| 176 | |
| 177 | <!-- Define role to detect the supported hook --> |
| 178 | <!-- {"rule":"customizer","event":"onDisplayViewStatuscode","type":"fieldset"} --> |
| 179 | |
| 180 | <?php |
| 181 | /** |
| 182 | * Iterate remaining forms to be displayed within |
| 183 | * the sidebar (below "Publishing" fieldset). |
| 184 | * |
| 185 | * @since 1.7 |
| 186 | */ |
| 187 | foreach ($forms as $formName => $formHtml) |
| 188 | { |
| 189 | $title = JText::translate($formName); |
| 190 | ?> |
| 191 | <div class="row-fluid"> |
| 192 | <div class="span12"> |
| 193 | <?php |
| 194 | echo $vik->openFieldset($title); |
| 195 | echo $formHtml; |
| 196 | echo $vik->closeFieldset(); |
| 197 | ?> |
| 198 | </div> |
| 199 | </div> |
| 200 | <?php |
| 201 | } |
| 202 | ?> |
| 203 | |
| 204 | </div> |
| 205 | |
| 206 | <?php echo $vik->closeCard(); ?> |
| 207 | |
| 208 | <?php echo JHtml::fetch('form.token'); ?> |
| 209 | |
| 210 | <input type="hidden" name="id" value="<?php echo $status->id; ?>" /> |
| 211 | <input type="hidden" name="task" value="" /> |
| 212 | <input type="hidden" name="option" value="com_vikappointments" /> |
| 213 | </form> |
| 214 | |
| 215 | <script> |
| 216 | |
| 217 | // validate |
| 218 | |
| 219 | var validator = new VikFormValidator('#adminForm'); |
| 220 | |
| 221 | Joomla.submitbutton = function(task) { |
| 222 | if (task.indexOf('save') !== -1) { |
| 223 | if (validator.validate()) { |
| 224 | Joomla.submitform(task, document.adminForm); |
| 225 | } |
| 226 | } else { |
| 227 | Joomla.submitform(task, document.adminForm); |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | </script> |
| 232 |