PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.20
VikAppointments Services Booking Calendar v1.2.20
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / newmedia / tmpl / default_media.php
vikappointments / admin / views / newmedia / tmpl Last commit date
default.php 1 month ago default_media.php 1 month ago default_upload.php 1 month ago index.html 1 month ago
default_media.php
93 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 $vik = VAPApplication::getInstance();
15
16 $properties = $this->properties;
17
18 ?>
19
20 <!-- RESIZE - Checkbox -->
21
22 <?php
23 $yes = $vik->initRadioElement('', '', $properties['isresize'] == 1, 'onClick="resizeStatusChanged(1);"');
24 $no = $vik->initRadioElement('', '', $properties['isresize'] == 0, 'onClick="resizeStatusChanged(0);"');
25
26 echo $vik->openControl(JText::translate('VAPMANAGEMEDIA8'));
27 echo $vik->radioYesNo('isresize', $yes, $no, false);
28 echo $vik->closeControl();
29 ?>
30
31 <?php
32 $control = array();
33 $control['style'] = $properties['isresize'] ? '' : 'display:none;';
34 ?>
35
36 <hr class="original-size" style="<?php echo $control['style']; ?>" />
37
38 <!-- ORIGINAL WIDTH - Number -->
39
40 <?php echo $vik->openControl(JText::translate('VAPMANAGEMEDIA6'), 'original-size', $control); ?>
41 <div class="input-append">
42 <input type="number" name="oriwres" value="<?php echo $properties['oriwres']; ?>" size="4" min="64" max="9999" step="1" <?php echo ($properties['isresize'] ? '' : 'readonly'); ?> />
43
44 <span class="btn">px</span>
45 </div>
46 <?php echo $vik->closeControl(); ?>
47
48 <!-- ORIGINAL HEIGHT - Number -->
49
50 <?php echo $vik->openControl(JText::translate('VAPMANAGEMEDIA15'), 'original-size', $control); ?>
51 <div class="input-append">
52 <input type="number" name="orihres" value="<?php echo $properties['orihres']; ?>" size="4" min="64" max="9999" step="1" <?php echo ($properties['isresize'] ? '' : 'readonly'); ?> />
53
54 <span class="btn">px</span>
55 </div>
56 <?php echo $vik->closeControl(); ?>
57
58 <hr />
59
60 <!-- THUMBNAIL WIDTH - Number -->
61
62 <?php echo $vik->openControl(JText::translate('VAPMANAGEMEDIA7')); ?>
63 <div class="input-append">
64 <input type="number" name="smallwres" value="<?php echo $properties['smallwres']; ?>" size="4" min="16" max="1024" step="1" />
65
66 <span class="btn">px</span>
67 </div>
68 <?php echo $vik->closeControl(); ?>
69
70 <!-- THUMBNAIL HEIGHT - Number -->
71
72 <?php echo $vik->openControl(JText::translate('VAPMANAGEMEDIA16')); ?>
73 <div class="input-append">
74 <input type="number" name="smallhres" value="<?php echo $properties['smallhres']; ?>" size="4" min="16" max="1024" step="1" />
75
76 <span class="btn">px</span>
77 </div>
78 <?php echo $vik->closeControl(); ?>
79
80 <script>
81
82 function resizeStatusChanged(is) {
83 jQuery('input[name="oriwres"],input[name="orihres"]').prop('readonly', is ? false : true);
84
85 if (is) {
86 jQuery('.original-size').show();
87 } else {
88 jQuery('.original-size').hide();
89 }
90 }
91
92 </script>
93