default.php
1 month ago
default_media.php
1 month ago
default_upload.php
1 month ago
index.html
1 month ago
default.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 | if ($this->showHelp) |
| 15 | { |
| 16 | JHtml::fetch('vaphtml.assets.toast', 'bottom-right'); |
| 17 | JText::script('VAPMEDIAFIRSTCONFIG2'); |
| 18 | } |
| 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 "onDisplayViewMedia". 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" enctype="multipart/form-data" id="adminForm"> |
| 36 | |
| 37 | <?php echo $vik->openCard(); ?> |
| 38 | |
| 39 | <div class="span12"> |
| 40 | |
| 41 | <div class="row-fluid"> |
| 42 | |
| 43 | <div class="span6"> |
| 44 | <?php |
| 45 | echo $vik->openFieldset(JText::translate('VAPMANAGEMEDIATITLE1')); |
| 46 | echo $this->loadTemplate('upload'); |
| 47 | ?> |
| 48 | |
| 49 | <!-- Define role to detect the supported hook --> |
| 50 | <!-- {"rule":"customizer","event":"onDisplayViewMedia","key":"upload","type":"field"} --> |
| 51 | |
| 52 | <?php |
| 53 | /** |
| 54 | * Look for any additional fields to be pushed within |
| 55 | * the "Media File" fieldset (left-side). |
| 56 | * |
| 57 | * @since 1.7 |
| 58 | */ |
| 59 | if (isset($forms['upload'])) |
| 60 | { |
| 61 | echo $forms['upload']; |
| 62 | |
| 63 | // unset details form to avoid displaying it twice |
| 64 | unset($forms['upload']); |
| 65 | } |
| 66 | |
| 67 | echo $vik->closeFieldset(); ?> |
| 68 | </div> |
| 69 | |
| 70 | <div class="span6"> |
| 71 | <?php |
| 72 | echo $vik->openFieldset(JText::translate('VAPMEDIAPROPBOXTITLE')); |
| 73 | echo $this->loadTemplate('media'); |
| 74 | ?> |
| 75 | |
| 76 | <!-- Define role to detect the supported hook --> |
| 77 | <!-- {"rule":"customizer","event":"onDisplayViewMedia","key":"media","type":"field"} --> |
| 78 | |
| 79 | <?php |
| 80 | /** |
| 81 | * Look for any additional fields to be pushed within |
| 82 | * the "Media Properties" fieldset (left-side). |
| 83 | * |
| 84 | * @since 1.7 |
| 85 | */ |
| 86 | if (isset($forms['media'])) |
| 87 | { |
| 88 | echo $forms['media']; |
| 89 | |
| 90 | // unset details form to avoid displaying it twice |
| 91 | unset($forms['media']); |
| 92 | } |
| 93 | |
| 94 | echo $vik->closeFieldset(); ?> |
| 95 | </div> |
| 96 | |
| 97 | </div> |
| 98 | |
| 99 | <div class="row-fluid"> |
| 100 | <div class="span12" style="display: none;" id="vap-uploads"> |
| 101 | <?php echo $vik->openFieldset(JText::translate('VAPMANAGEMEDIATITLE3')); ?> |
| 102 | <div class="control" id="vap-uploads-cont"></div> |
| 103 | <?php echo $vik->closeFieldset(); ?> |
| 104 | </div> |
| 105 | </div> |
| 106 | |
| 107 | </div> |
| 108 | |
| 109 | <?php echo $vik->closeCard(); ?> |
| 110 | |
| 111 | <?php echo JHtml::fetch('form.token'); ?> |
| 112 | |
| 113 | <input type="hidden" name="task" value="" /> |
| 114 | <input type="hidden" name="option" value="com_vikappointments" /> |
| 115 | </form> |
| 116 | |
| 117 | <script> |
| 118 | |
| 119 | <?php |
| 120 | /** |
| 121 | * Display a toast message to guide the user about |
| 122 | * the steps needed to change the default size |
| 123 | * that will be used to create the thumbnails. |
| 124 | */ |
| 125 | if ($this->showHelp) |
| 126 | { |
| 127 | ?> |
| 128 | jQuery(function($) { |
| 129 | // display toast message with a delay of 256 ms |
| 130 | setTimeout(() => { |
| 131 | ToastMessage.dispatch({ |
| 132 | text: Joomla.JText._('VAPMEDIAFIRSTCONFIG2'), |
| 133 | status: 3, |
| 134 | delay: 10000, |
| 135 | }); |
| 136 | }, 256); |
| 137 | }); |
| 138 | <?php |
| 139 | } |
| 140 | ?> |
| 141 | |
| 142 | </script> |
| 143 |