first commit
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
\JHtml::script('plg_system_nrframework/widgets/colorpicker.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
\JHtml::stylesheet('plg_system_nrframework/widgets/colorpicker.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
JFactory::getDocument()->addStyleDeclaration('
|
||||
.nrf-colorpicker-wrapper.' . $id . ' {
|
||||
--input-background-color: ' . $input_bg_color . ';
|
||||
--input-border-color: ' . $input_border_color . ';
|
||||
--input-border-color-focus: ' . $input_border_color_focus . ';
|
||||
--input-text-color: ' . $input_text_color . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget nrf-colorpicker-wrapper<?php echo $css_class; ?>">
|
||||
<input type="color"
|
||||
value="<?php echo $value; ?>"
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<input type="text"
|
||||
id="<?php echo $id; ?>"
|
||||
name="<?php echo $name; ?>"
|
||||
class="<?php echo $input_class; ?>"
|
||||
value="<?php echo $value; ?>"
|
||||
placeholder="<?php echo $placeholder; ?>"
|
||||
<?php if ($required) { ?>
|
||||
required
|
||||
<?php } ?>
|
||||
<?php if ($readonly): ?>
|
||||
readonly
|
||||
<?php endif; ?>
|
||||
/>
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if ($countdown_type === 'static' && (empty($value) || $value === '0000-00-00 00:00:00'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
if ($theme !== 'custom')
|
||||
{
|
||||
\JHtml::stylesheet('plg_system_nrframework/widgets/countdown.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
else
|
||||
{
|
||||
\JHtml::stylesheet('plg_system_nrframework/widgets/widget.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($load_css_vars && !empty($custom_css))
|
||||
{
|
||||
JFactory::getDocument()->addStyleDeclaration($custom_css);
|
||||
}
|
||||
|
||||
\JHtml::script('plg_system_nrframework/widgets/countdown.js', ['relative' => true, 'version' => 'auto']);
|
||||
?>
|
||||
<div class="nrf-widget nrf-countdown<?php echo $css_class; ?>" id="<?php echo $id; ?>" <?php echo $atts; ?>></div>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$items || !is_array($items) || !count($items))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$readonly && !$disabled && $lightbox)
|
||||
{
|
||||
JHtml::script('plg_system_nrframework/widgets/gallery/gallery.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
JHtml::stylesheet('plg_system_nrframework/widgets/gallery.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="nrf-widget tf-gallery-wrapper<?php echo $css_class; ?>" data-id="<?php echo $id; ?>">
|
||||
<div class="gallery-items<?php echo $gallery_items_css; ?>">
|
||||
<?php
|
||||
foreach ($items as $index => $item)
|
||||
{
|
||||
// If its an invalid image path, show a warning and continue
|
||||
if (isset($item['invalid']) && $show_warnings)
|
||||
{
|
||||
echo '<div><strong>Warning:</strong> ' . sprintf(\JText::_('NR_INVALID_IMAGE_PATH'), $item['path']) . '</div>';
|
||||
continue;
|
||||
}
|
||||
|
||||
$item['index'] = $index;
|
||||
$displayData['item'] = $item;
|
||||
echo $this->sublayout('item', $displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if ($lightbox)
|
||||
{
|
||||
echo $this->sublayout('glightbox', $displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
JHtml::stylesheet('https://cdn.jsdelivr.net/npm/glightbox@3.1.0/dist/css/glightbox.min.css');
|
||||
JHtml::script('https://cdn.jsdelivr.net/gh/mcstudios/glightbox@3.1.0/dist/js/glightbox.min.js');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use NRFramework\Helpers\Widgets\Gallery as GalleryHelper;
|
||||
?>
|
||||
<figure class="item">
|
||||
<?php if ($lightbox) { ?>
|
||||
<a href="<?php echo $item['url']; ?>" class="tf-gallery-lightbox-item <?php echo $id; ?>" data-type="image" data-description=".glightbox-desc.<?php echo $id; ?>.desc-<?php echo $item['index']; ?>">
|
||||
<?php } ?>
|
||||
<img loading="lazy" class="<?php echo $thumb_class ?>" src="<?php echo $item['thumbnail_url']; ?>"<?php echo $item['img_atts']; ?> alt="<?php echo strip_tags($item['alt']); ?>" />
|
||||
<?php if ($lightbox) { ?>
|
||||
</a>
|
||||
<div class="glightbox-desc <?php echo $id . ' desc-' . $item['index']; ?>">
|
||||
<div class="caption"><?php echo nl2br($item['caption']); ?></div>
|
||||
<div class="module"><?php echo !empty($module) ? GalleryHelper::loadModule($module) : ''; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</figure>
|
||||
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
|
||||
if (!$disabled)
|
||||
{
|
||||
if (strpos($css_class, 'ordering-default') !== false)
|
||||
{
|
||||
JHtml::script('https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js');
|
||||
}
|
||||
|
||||
// Required in the front-end for the media manager to work
|
||||
if (!defined('nrJ4'))
|
||||
{
|
||||
JHtml::_('behavior.modal');
|
||||
// Front-end editing: The below script is required for front-end media library selection to work as its missing from parent window when called
|
||||
if (JFactory::getApplication()->isClient('site'))
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
function jInsertFieldValue(value, id) {
|
||||
var old_id = document.id(id).value;
|
||||
if (old_id != id) {
|
||||
var elem = document.id(id)
|
||||
elem.value = value;
|
||||
elem.fireEvent("change");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle');
|
||||
|
||||
$doc = JFactory::getApplication()->getDocument();
|
||||
$doc->addScriptOptions('media-picker', [
|
||||
'images' => array_map(
|
||||
'trim',
|
||||
explode(
|
||||
',',
|
||||
ComponentHelper::getParams('com_media')->get(
|
||||
'image_extensions',
|
||||
'bmp,gif,jpg,jpeg,png'
|
||||
)
|
||||
)
|
||||
)
|
||||
]);
|
||||
|
||||
$wam = $doc->getWebAssetManager();
|
||||
$wam->useScript('webcomponent.media-select');
|
||||
|
||||
Text::script('JFIELD_MEDIA_LAZY_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_CHECK_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_CHECK_DESC_LABEL');
|
||||
Text::script('JFIELD_MEDIA_CLASS_LABEL');
|
||||
Text::script('JFIELD_MEDIA_FIGURE_CLASS_LABEL');
|
||||
Text::script('JFIELD_MEDIA_FIGURE_CAPTION_LABEL');
|
||||
Text::script('JFIELD_MEDIA_LAZY_LABEL');
|
||||
Text::script('JFIELD_MEDIA_SUMMARY_LABEL');
|
||||
}
|
||||
}
|
||||
|
||||
// Use admin gallery manager path if browsing via backend
|
||||
$gallery_manager_path = JFactory::getApplication()->isClient('administrator') ? 'administrator/' : '';
|
||||
|
||||
// Javascript files should always load as they are used to populate the Gallery Manager via Dropzone
|
||||
JHtml::script('plg_system_nrframework/dropzone.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
JHtml::script('plg_system_nrframework/widgets/gallery/manager_init.js', ['relative' => true, 'version' => 'auto']);
|
||||
JHtml::script('plg_system_nrframework/widgets/gallery/manager.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
JHtml::stylesheet('plg_system_nrframework/widgets/gallerymanager.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
?>
|
||||
<!-- Gallery Manager -->
|
||||
<div class="nrf-widget tf-gallery-manager<?php echo $css_class; ?>" data-field-id="<?php echo $field_id; ?>">
|
||||
<!-- Make Joomla client-side form validator happy by adding a fake hidden input field when the Gallery is required. -->
|
||||
<?php if ($required) { ?>
|
||||
<input type="hidden" required class="required" id="<?php echo $id; ?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="tf-gallery-actions">
|
||||
<div class="btn-group tf-gallery-actions-dropdown<?php echo !defined('nrJ4') ? ' dropdown' : ''; ?> " title="<?php echo Text::_('NR_GALLERY_MANAGER_SELECT_UNSELECT_IMAGES'); ?>">
|
||||
<button class="btn btn-secondary add tf-gallery-actions-dropdown-current tf-gallery-actions-dropdown-action select" onclick="return false;"><i class="me-2 icon-checkbox-unchecked"></i></button>
|
||||
<button class="btn btn-secondary add dropdown-toggle dropdown-toggle-split" data-<?php echo defined('nrJ4') ? 'bs-' : ''; ?>toggle="dropdown" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_DROPDOWN'); ?>">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" class="dropdown-item tf-gallery-actions-dropdown-action select"><?php echo Text::_('NR_GALLERY_MANAGER_SELECT_ALL_ITEMS'); ?></a></li>
|
||||
<li><a href="#" class="dropdown-item tf-gallery-actions-dropdown-action unselect is-hidden"><?php echo Text::_('NR_GALLERY_MANAGER_UNSELECT_ALL_ITEMS'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="tf-gallery-regenerate-thumbs-button icon-button" title="<?php echo Text::_('NR_GALLERY_MANAGER_REGENERATE_THUMBNAILS'); ?>">
|
||||
<i class="icon-refresh"></i>
|
||||
<div class="message"></div>
|
||||
</a>
|
||||
<a class="tf-gallery-remove-selected-items-button icon-button" title="<?php echo Text::_('NR_GALLERY_MANAGER_REMOVE_SELECTED_IMAGES'); ?>">
|
||||
<i class="icon-trash"></i>
|
||||
</a>
|
||||
<div class="btn-group add-button<?php echo !defined('nrJ4') ? ' dropdown' : ''; ?>">
|
||||
<button class="btn btn-success add tf-gallery-add-item-button" onclick="return false;" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_IMAGES'); ?>"><i class="me-2 icon-pictures"></i><?php echo Text::_('NR_GALLERY_MANAGER_ADD_IMAGES'); ?></button>
|
||||
<button class="btn btn-success add dropdown-toggle dropdown-toggle-split" data-<?php echo defined('nrJ4') ? 'bs-' : ''; ?>toggle="dropdown" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_DROPDOWN'); ?>">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a <?php echo !defined('nrJ4') ? 'rel="{handler: \'iframe\', size: {x: 1000, y: 750}}" href="' . JURI::root() . $gallery_manager_path . '?option=com_media&view=images&tmpl=component&fieldid=' . $id . '_uploaded_file"' : 'href="#" data-bs-toggle="modal" data-bs-target="#tf-GalleryMediaManager" data-gallery-id="' . $id . '"'; ?> class="dropdown-item tf-gallery-browse-item-button<?php echo !defined('nrJ4') ? ' modal' : ''; ?> popup" title="<?php echo Text::_('NR_GALLERY_MANAGER_BROWSE_MEDIA_LIBRARY'); ?>"><i class="me-2 icon-folder-open"></i><?php echo Text::_('NR_GALLERY_MANAGER_BROWSE_MEDIA_LIBRARY'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="hidden" class="media_uploader_file" id="<?php echo $id; ?>_uploaded_file" />
|
||||
</div>
|
||||
<!-- /Actions -->
|
||||
|
||||
<!-- Dropzone -->
|
||||
<div
|
||||
data-inputname="<?php echo $name; ?>"
|
||||
data-maxfilesize="<?php echo $max_file_size; ?>"
|
||||
data-maxfiles="<?php echo $limit_files; ?>"
|
||||
data-acceptedfiles="<?php echo $allowed_file_types; ?>"
|
||||
data-value='<?php echo $gallery_items ? json_encode($gallery_items, JSON_HEX_APOS) : ''; ?>'
|
||||
data-baseurl="<?php echo JURI::base(); ?>"
|
||||
data-rooturl="<?php echo JURI::root(); ?>"
|
||||
class="tf-gallery-dz">
|
||||
<!-- DZ Message Wrapper -->
|
||||
<div class="dz-message">
|
||||
<!-- Message -->
|
||||
<div class="dz-message-center">
|
||||
<span class="text"><?php echo Text::_('NR_GALLERY_MANAGER_DRAG_AND_DROP_TEXT'); ?></span>
|
||||
<span class="browse"><?php echo Text::_('NR_GALLERY_MANAGER_BROWSE'); ?></span>
|
||||
</div>
|
||||
<!-- /Message -->
|
||||
</div>
|
||||
<!-- /DZ Message Wrapper -->
|
||||
</div>
|
||||
<!-- /Dropzone -->
|
||||
|
||||
<!-- Dropzone Preview Template -->
|
||||
<template class="previewTemplate">
|
||||
<div class="tf-gallery-preview-item template" data-item-id="">
|
||||
<div class="select-item-checkbox" title="<?php echo Text::_('NR_GALLERY_MANAGER_CHECK_TO_DELETE_ITEMS'); ?>">
|
||||
<input type="checkbox" id="<?php echo $name; ?>[select-item]" />
|
||||
<label for="<?php echo $name; ?>[select-item]"></label>
|
||||
</div>
|
||||
<a href="#" class="tf-gallery-preview-remove-item" title="<?php echo Text::_('NR_GALLERY_MANAGER_CLICK_TO_DELETE_ITEM'); ?>" data-dz-remove><svg fill="#dedede" viewBox="0 0 512 512" width="13" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5 c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9 c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg></a>
|
||||
<div class="inner">
|
||||
<div class="dz-status"></div>
|
||||
<div class="dz-thumb">
|
||||
<div class="dz-progress"><span class="text"><?php echo Text::_('NR_GALLERY_MANAGER_UPLOADING'); ?></span><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
<div class="tf-gallery-preview-in-queue"><?php echo Text::_('NR_GALLERY_MANAGER_IN_QUEUE'); ?></div>
|
||||
<img data-dz-thumbnail />
|
||||
</div>
|
||||
<div class="dz-details">
|
||||
<div class="detail">
|
||||
<textarea name="<?php echo $name; ?>[caption]" class="item-caption" placeholder="<?php echo Text::_('NR_GALLERY_MANAGER_CAPTION_HINT'); ?>" title="<?php echo Text::_('NR_GALLERY_MANAGER_CAPTION_HINT'); ?>" rows="5"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tf-gallery-preview-error"><div data-dz-errormessage></div></div>
|
||||
<input type="hidden" value="" class="item-thumbnail" name="<?php echo $name; ?>[thumbnail]" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- /Dropzone Preview Template -->
|
||||
|
||||
<?php
|
||||
// Print Joomla 4 Media Manager modal only if Gallery is not disabled
|
||||
if (defined('nrJ4') && !$disabled)
|
||||
{
|
||||
$opts = [
|
||||
'title' => Text::_('NR_GALLERY_MANAGER_SELECT_ITEM'),
|
||||
'url' => Route::_(JURI::root() . $gallery_manager_path . '?option=com_media&view=media&tmpl=component'),
|
||||
'height' => '400px',
|
||||
'width' => '800px',
|
||||
'bodyHeight' => 80,
|
||||
'modalWidth' => 80,
|
||||
'backdrop' => 'static',
|
||||
'footer' => '<button type="button" class="btn btn-secondary tf-gallery-button-save-selected button-save-selected" data-bs-dismiss="modal">' . Text::_('JSELECT') . '</button>' . '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('JCANCEL') . '</button>',
|
||||
'isJoomla' => true
|
||||
];
|
||||
HTMLHelper::_('bootstrap.modal', '#tf-GalleryMediaManager', $opts);
|
||||
|
||||
$layoutData = [
|
||||
'selector' => 'tf-GalleryMediaManager',
|
||||
'params' => $opts,
|
||||
'body' => ''
|
||||
];
|
||||
|
||||
echo \Joomla\CMS\Layout\LayoutHelper::render('libraries.html.bootstrap.modal.main', $layoutData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<!-- /Gallery Manager -->
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
JFactory::getDocument()->addStyleDeclaration('
|
||||
.nrf-widget.osm.' . $id . ' {
|
||||
--width: ' . $options['width'] . ';
|
||||
--height: ' . $options['height'] . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget osm nr-lazyload-item nr-address-component<?php echo $options['css_class']; ?>">
|
||||
<div class="inner">
|
||||
<div class="osm_map_item" data-options="<?php echo htmlspecialchars(json_encode($options)); ?>"></div>
|
||||
<?php if ($options['showMarkerTooltip']): ?>
|
||||
<div class="marker-tooltip" style="display:none;"><div class="tooltip-body"><?php echo nl2br($options['markerTooltipValue']); ?></div><div class="arrow"></div></div>
|
||||
<?php endif; ?>
|
||||
<div class="field-settings">
|
||||
<?php if ($options['showCoordsInput']): ?>
|
||||
<div class="control-group map-coordinates-setting">
|
||||
<label class="control-label" for="<?php echo $options['id']; ?>_coords_input"><?php echo JText::_('NR_OSM_COORDINATES_LABEL'); ?></label>
|
||||
<div class="controls coords-wrapper">
|
||||
<input type="text" id="<?php echo $options['id']; ?>_coords_input" name="<?php echo $options['coordsInputName']; ?>" value="<?php echo $options['value']; ?>" class="address-input nr_address_coords"<?php echo ($options['readonly'] || $options['disabled']) ? ' readonly' : ''; ?> />
|
||||
<a href="#" class="map_reset_btn<?php echo ($options['readonly'] || $options['disabled']) ? ' disabled' : ''; ?>" title="<?php echo JText::_('NR_OSM_CLEAR_BUTTON_TITLE'); ?>"><?php echo JText::_('NR_CLEAR'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<input type="hidden" name="<?php echo $options['coordsInputName']; ?>" class="nr_address_coords" value="<?php echo $options['value']; ?>"<?php echo ($options['readonly'] || $options['disabled']) ? ' readonly' : ''; ?> />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($options['showMarkerTooltipInput']): ?>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="<?php echo $options['id']; ?>_tooltip_label"><?php echo JText::_('NR_OSM_TOOLTIP_LABEL'); ?></label>
|
||||
<div class="controls">
|
||||
<textarea id="<?php echo $options['id']; ?>_tooltip_label"
|
||||
class="address-input"
|
||||
rows="3"
|
||||
name="<?php echo $options['markerTooltipName']; ?>"
|
||||
<?php if ($options['readonly'] || $options['disabled']): ?>
|
||||
readonly
|
||||
<?php endif; ?>
|
||||
placeholder="<?php echo JText::_('NR_OSM_TOOLTIP_LABEL_HINT'); ?>"><?php echo $options['markerTooltipValue']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
JHtml::script('plg_system_nrframework/widgets/slider.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
JHtml::stylesheet('plg_system_nrframework/widgets/slider.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
JFactory::getDocument()->addStyleDeclaration('
|
||||
.nrf-slider-wrapper.' . $id . ' {
|
||||
--base-color: ' . $base_color . ';
|
||||
--progress-color: ' . $color . ';
|
||||
--input-bg-color: ' . $input_bg_color . ';
|
||||
--input-border-color: ' . $input_border_color . ';
|
||||
--thumb-shadow-color: ' . $color . '26' . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget nrf-slider-wrapper <?php echo $css_class; ?>">
|
||||
<input
|
||||
type="range"
|
||||
class="nrf-slider-range"
|
||||
min="<?php echo $min; ?>"
|
||||
max="<?php echo $max; ?>"
|
||||
step="<?php echo $step; ?>"
|
||||
value="<?php echo $value; ?>"
|
||||
<?php if ($load_css_vars): ?>
|
||||
data-base-color="<?php echo $base_color; ?>"
|
||||
data-progress-color="<?php echo $color; ?>"
|
||||
style="background: linear-gradient(to right, <?php echo $color; ?> 0%, <?php echo $color . ' ' . $bar_percentage; ?>%, <?php echo $base_color . ' ' . $bar_percentage; ?>%, <?php echo $base_color; ?> 100%)"
|
||||
<?php endif; ?>
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<input
|
||||
type="number"
|
||||
value="<?php echo $value; ?>"
|
||||
id="<?php echo $id; ?>"
|
||||
name="<?php echo $name; ?>"
|
||||
min="<?php echo $min; ?>"
|
||||
max="<?php echo $max; ?>"
|
||||
step="<?php echo $step; ?>"
|
||||
class="nrf-slider-value <?php echo $input_class; ?>"
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
readonly
|
||||
<?php endif; ?>
|
||||
/>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
JHtml::script('plg_system_nrframework/widgets/rating.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
JHtml::stylesheet('plg_system_nrframework/widgets/rating.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
JFactory::getDocument()->addStyleDeclaration('
|
||||
.nrf-rating-wrapper.' . $id . ' {
|
||||
--rating-selected-color: ' . $selected_color . ';
|
||||
--rating-unselected-color: ' . $unselected_color . ';
|
||||
--rating-size: ' . $size . 'px;
|
||||
}
|
||||
');
|
||||
}
|
||||
|
||||
echo $this->sublayout($half_ratings ? 'half' : 'full', $displayData);
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
?>
|
||||
<div class="nrf-widget nrf-rating-wrapper <?php echo $css_class; ?>">
|
||||
<?php
|
||||
for ($i = 1; $i <= $max_rating; $i++)
|
||||
{
|
||||
$label_class = '';
|
||||
$rating_id = $id . '_' . $i;
|
||||
|
||||
if ($value && $i <= $value)
|
||||
{
|
||||
$label_class = 'iconFilled';
|
||||
}
|
||||
?>
|
||||
<input type="radio" class="<?php echo $input_class; ?>" id="<?php echo $rating_id; ?>" name="<?php echo $name; ?>"
|
||||
value="<?php echo $i; ?>"
|
||||
<?php if ($value && $i == $value): ?>
|
||||
checked
|
||||
<?php endif; ?>
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<label for="<?php echo $rating_id; ?>" class="<?php echo $label_class; ?>" title="<?php echo $i; ?> <?php echo sprintf(\JText::_('NR_STAR'), ($i > 1 ? 's' : '')); ?>">
|
||||
<svg class="svg-item">
|
||||
<use xlink:href="<?php echo $icon_url; ?>#nrf-ratings-<?php echo $icon; ?>" />
|
||||
</svg>
|
||||
</label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$css_class .= ' ' . $size;
|
||||
?>
|
||||
<div class="nrf-widget nrf-rating-wrapper half <?php echo $css_class; ?>">
|
||||
<?php
|
||||
$counter = 0;
|
||||
$prev_counter = 0;
|
||||
|
||||
// initial value value
|
||||
$rating_value = 0.5;
|
||||
|
||||
for ($i = 0; $i < $max_rating; $i++)
|
||||
{
|
||||
$label_class = '';
|
||||
|
||||
// wrapper start - for half rating item (half and full star)
|
||||
if ($counter % 2 == 0)
|
||||
{
|
||||
$prev_counter = $counter;
|
||||
?><span class="rating_item_group"><?php
|
||||
}
|
||||
|
||||
$rating_item_type = fmod($rating_value, 1) == 0.5 ? 'half' : 'full';
|
||||
$rating_id = $id . '_' . $i . '_' . $rating_item_type;
|
||||
|
||||
if ($value && $rating_value <= $value)
|
||||
{
|
||||
$label_class = ' iconFilled';
|
||||
}
|
||||
?>
|
||||
<input type="radio"
|
||||
class="<?php echo $input_class; ?>"
|
||||
id="<?php echo $rating_id; ?>"
|
||||
name="<?php echo $name; ?>"
|
||||
value="<?php echo $rating_value; ?>"
|
||||
<?php if ($value && $rating_value == $value): ?>
|
||||
checked
|
||||
<?php endif; ?>
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<label class="<?php echo $rating_item_type . $label_class; ?>" for="<?php echo $rating_id; ?>" title="<?php echo $rating_value; ?> <?php echo sprintf(\JText::_('NR_STAR'), ($rating_value > 1 ? 's' : '')); ?>">
|
||||
<svg class="svg-item">
|
||||
<use xlink:href="<?php echo $icon_url; ?>#nrf-ratings-<?php echo $icon; ?>" />
|
||||
</svg>
|
||||
</label>
|
||||
<?php
|
||||
|
||||
// wrapper end - for half rating item
|
||||
if ($counter == $prev_counter + 1)
|
||||
{
|
||||
?></span><?php
|
||||
}
|
||||
$counter++;
|
||||
|
||||
// increase value
|
||||
$rating_value += 0.5;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
\JHtml::script('https://cdn.jsdelivr.net/npm/signature_pad@4.0.4/dist/signature_pad.umd.min.js');
|
||||
\JHtml::script('plg_system_nrframework/widgets/signature.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
\JHtml::stylesheet('plg_system_nrframework/widgets/signature.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
JFactory::getDocument()->addStyleDeclaration('
|
||||
.nrf-widget.signature.' . $id . ' {
|
||||
--width: ' . $width . ';
|
||||
--height: ' . $height . ';
|
||||
--input-border-width: ' . $border_width . ';
|
||||
--input-border-color: ' . $border_color . ';
|
||||
--input-border-radius: ' . $border_radius . ';
|
||||
--input-background-color: ' . $background_color . ';
|
||||
--line-color: ' . (is_null($line_color) ? $border_color : $line_color) . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget signature<?php echo $css_class; ?>">
|
||||
<div class="nrf-signature-body">
|
||||
<div class="actions">
|
||||
<svg class="nrf-signature-clear" width="22" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z"></path></svg>
|
||||
<svg class="nrf-signature-reset" width="22" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"></path></svg>
|
||||
</div>
|
||||
<canvas data-pen-color="<?php echo $pen_color; ?>"></canvas>
|
||||
<input type="hidden" value="<?php echo htmlspecialchars($value); ?>" name="<?php echo $name; ?>" />
|
||||
<input type="hidden" value="<?php echo htmlspecialchars($value); ?>" class="initial-value" />
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user