first commit

This commit is contained in:
2026-02-08 21:16:11 +01:00
commit e17b7026fd
8881 changed files with 1160453 additions and 0 deletions

View File

@@ -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 © 2020 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);
$cssclass = isset($field->cssclass) ? $field->cssclass : '';
// Load Input Masking
if (isset($field->inputmask) && !empty($field->inputmask))
{
JHtml::script('com_convertforms/vendor/inputmask.min.js', ['relative' => true, 'version' => 'auto']);
JHtml::script('com_convertforms/inputmask.js', ['relative' => true, 'version' => 'auto']);
JText::script('COM_CONVERTFORMS_ERROR_INPUTMASK_INCOMPLETE');
}
// Safe label is used by the getFieldsArray()
$safeLabel = isset($field->label) ? htmlspecialchars(trim(strip_tags($field->label)), ENT_NOQUOTES, 'UTF-8') : null;
$helpTextPosition = $form['params']->get('help_text_position', 'after');
?>
<div class="cf-control-group <?php echo $cssclass; ?>" data-key="<?php echo $field->key; ?>" data-name="<?php echo $field->name; ?>" <?php echo $safeLabel ? 'data-label="' . $safeLabel . '"' : '' ?> data-type="<?php echo $field->type ?>" <?php echo (isset($field->required) && $field->required) ? 'data-required' : '' ?>>
<?php if (isset($field->hidelabel) && !$field->hidelabel && !empty($field->label)) { ?>
<div class="cf-control-label">
<label class="cf-label" for="<?php echo $field->input_id; ?>">
<?php echo $field->label ?>
<?php if ($form['params']->get('required_indication', true) && $field->required) { ?>
<span class="cf-required-label">*</span>
<?php } ?>
</label>
</div>
<?php } ?>
<div class="cf-control-input">
<?php
if ($helpTextPosition == 'before')
{
include __DIR__ . '/helptext.php';
}
echo $field->input;
if ($helpTextPosition == 'after')
{
include __DIR__ . '/helptext.php';
}
?>
</div>
</div>

View File

@@ -0,0 +1,32 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2022 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="captcha-container">
<div class="captcha-equation">
<?php echo $field->question['number1']; ?>
<?php echo $field->question['comparator']; ?>
<?php echo $field->question['number2']; ?> =
</div>
<?php // We do not use $this->input_name here in order to prevent the field to be included in the submitted data ?>
<input type="text" name="<?php echo $field->name; ?>" id="<?php echo $field->input_id; ?>"
required
autocomplete="off"
placeholder="<?php echo isset($field->placeholder) ? $field->placeholder : '' ?>"
class="<?php echo $field->class ?>"
/>
</div>

View File

@@ -0,0 +1,45 @@
<?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('Restricted access');
extract($displayData);
if (count($field->choices) > 1)
{
JHtml::_('script', 'com_convertforms/checkbox.js', array('version' => 'auto', 'relative' => true));
}
$choiceLayout = (isset($field->choicelayout) && !empty($field->choicelayout)) ? 'cf-list-' . $field->choicelayout . '-columns' : '';
?>
<div class="cf-list <?php echo $choiceLayout; ?>">
<?php foreach ($field->choices as $choiceKey => $choice) { ?>
<div class="cf-checkbox-group <?php if (isset($field->required) && $field->required) { ?> cf-checkbox-group-required <?php } ?>">
<input type="checkbox" name="<?php echo $field->input_name ?>[]" id="<?php echo $field->input_id . "_" . $choiceKey ?>"
value="<?php echo htmlspecialchars($choice['value']); ?>"
data-calc-value="<?php echo htmlspecialchars($choice['calc-value']) ?>"
<?php if (in_array($choice['value'], $field->value)) { ?> checked <?php } ?>
<?php if (isset($field->required) && $field->required) { ?>
required
<?php } ?>
class="<?php echo $field->class; ?>"
>
<label class="cf-label" for="<?php echo $field->input_id . "_" . $choiceKey; ?>">
<?php echo $choice['label'] ?>
</label>
</div>
<?php } ?>
</div>

View File

@@ -0,0 +1,19 @@
<?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('Restricted access');
extract($displayData);
echo $class->toWidget();
?>

View File

@@ -0,0 +1,28 @@
<?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('Restricted access');
extract($displayData);
$css = @file_get_contents(JPATH_ROOT . '/media/plg_system_nrframework/css/widgets/colorpicker.css');
$css .= '
.nrf-colorpicker-wrapper#' . $field->input_id . ' input[type="text"] {
border-color: ' . $field->form['params']->get('inputbordercolor', '#ffffff') . ';
background: ' . $field->form['params']->get('inputbg', '#ffffff') . ';
}
';
echo '<style>' . $css . '</style>';
echo $class->toWidget();
?>

View File

@@ -0,0 +1,27 @@
<?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('Restricted access');
extract($displayData);
$styles = [
'border-top-style: ' . $field->border_style,
'border-top-width: ' . (int) $field->border_width . 'px' ,
'border-top-color: ' . $field->border_color,
'margin-top:' . (int) $field->margin_top . 'px',
'margin-bottom:' . (int) $field->margin_bottom . 'px'
];
?>
<div class="cf-divider" style="<?php echo implode(';', $styles); ?>"></div>

View File

@@ -0,0 +1,36 @@
<?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('Restricted access');
extract($displayData);
?>
<div class="cf-select <?php echo $field->size ?>">
<select name="<?php echo $field->input_name ?>" id="<?php echo $field->input_id; ?>"
<?php if (isset($field->required) && $field->required) { ?>
required
<?php } ?>
class="<?php echo $field->class ?>"
>
<?php foreach ($field->choices as $choiceKey => $choice) { ?>
<option
value="<?php echo htmlspecialchars($choice['value']); ?>"
data-calc-value="<?php echo isset($choice['calc-value']) ? htmlspecialchars($choice['calc-value']) : '' ?>"
<?php if ($choice['value'] == $field->value) { ?> selected <?php } ?>
<?php if (isset($choice['disabled'])) { ?> disabled <?php } ?>>
<?php echo $choice['label']; ?>
</option>
<?php } ?>
</select>
</div>

View File

@@ -0,0 +1,28 @@
<?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('com_convertforms/field_editor.js', ['relative' => true , 'version' => 'auto']);
JHtml::stylesheet('com_convertforms/field_editor.css', ['relative' => true , 'version' => 'auto']);
JFactory::getDocument()->addStyleDeclaration('
#cf_' . $form['id'] . ' .cf-control-group[data-key="' . $field->key . '"] {
--height:' . $field->height . 'px
}
');
echo $field->richeditor;
?>

View File

@@ -0,0 +1,18 @@
<?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);
?>
<textarea class="<?php echo $field->class ?>" style="height:<?php echo $field->height ?>px !important;"><?php echo $field->value ?></textarea>

View File

@@ -0,0 +1,16 @@
<?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 style="height: <?php echo abs($field->gap); ?>px;"></div>

View File

@@ -0,0 +1,62 @@
<?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('Restricted access');
extract($displayData);
// Load dropzone library
JHtml::script('com_convertforms/vendor/dropzone.js', ['relative' => true, 'version' => 'auto']);
JHtml::script('com_convertforms/field_fileupload.js', ['relative' => true, 'version' => 'auto']);
// Add language strings used by dropzone.js
JText::script('COM_CONVERTFORMS_ERROR_WAIT_FILE_UPLOADS');
JText::script('COM_CONVERTFORMS_UPLOAD_FILETOOBIG');
JText::script('COM_CONVERTFORMS_UPLOAD_INVALID_FILE');
JText::script('COM_CONVERTFORMS_UPLOAD_FALLBACK_MESSAGE');
JText::script('COM_CONVERTFORMS_UPLOAD_RESPONSE_ERROR');
JText::script('COM_CONVERTFORMS_UPLOAD_CANCEL_UPLOAD');
JText::script('COM_CONVERTFORMS_UPLOAD_CANCEL_UPLOAD_CONFIRMATION');
JText::script('COM_CONVERTFORMS_UPLOAD_REMOVE_FILE');
JText::script('COM_CONVERTFORMS_UPLOAD_MAX_FILES_EXCEEDED');
?>
<div class="cfup-tmpl" style="display:none;">
<div class="cfup-file">
<div class="cfup-status"></div>
<div class="cfup-thumb">
<img data-dz-thumbnail />
</div>
<div class="cfup-details">
<div class="cfup-name" data-dz-name></div>
<div class="cfup-error"><div data-dz-errormessage></div></div>
<div class="cfup-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
</div>
<div class="cfup-right">
<span class="cfup-size" data-dz-size></span>
<a href="#" class="cfup-remove" data-dz-remove>×</a>
</div>
</div>
</div>
<div id="<?php echo $field->input_id ?>"
data-name="<?php echo $field->input_name ?>"
data-key="<?php echo $field->key ?>"
data-maxfilesize="<?php echo $field->max_file_size ?>"
data-maxfiles="<?php echo $field->limit_files ?>"
data-acceptedfiles="<?php echo $field->upload_types ?>"
class="cfupload">
<div class="dz-message">
<span><?php echo JText::_('COM_CONVERTFORMS_UPLOAD_DRAG_AND_DROP_FILES') ?></span>
<span class="cfupload-browse"><?php echo JText::_('COM_CONVERTFORMS_UPLOAD_BROWSE') ?></span>
</div>
</div>

View File

@@ -0,0 +1,35 @@
<?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('Restricted access');
extract($displayData);
if (!$class->getSiteKey() || !$class->getSecretKey())
{
echo JText::_('COM_CONVERTFORMS_FIELD_HCAPTCHA') . ': ' . JText::_('COM_CONVERTFORMS_FIELD_RECAPTCHA_KEYS_NOTE');
return;
}
// Load callback first for browser compatibility
JHtml::_('script', 'com_convertforms/hcaptcha.js', ['version' => 'auto', 'relative' => true], ['async' => 'async', 'defer' => 'defer']);
// Load hCAPTCHA API JS
JHtml::_('script', 'https://hcaptcha.com/1/api.js?onload=ConvertFormsInitHCaptcha&render=explicit&hl=' . \JFactory::getLanguage()->getTag(), [], ['async' => 'async', 'defer' => 'defer']);
?>
<div class="h-captcha"
data-sitekey="<?php echo $class->getSiteKey(); ?>"
data-theme="<?php echo $field->theme ?>"
data-size="<?php echo $field->hcaptcha_type == 'invisible' ? $field->hcaptcha_type : $field->size ?>">
</div>

View File

@@ -0,0 +1,27 @@
<?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('Restricted access');
extract($displayData);
// no hCaptcha image is present in invisible-mode
if ($field->hcaptcha_type == 'invisible')
{
return;
}
$suffix = $field->size == 'compact' ? '_compact' : '';
$imageURL = JURI::root() . 'media/com_convertforms/img/hcaptcha_' . $field->theme . $suffix . '.png';
?>
<img src="<?php echo $imageURL ?>" style="align-self: flex-start;" />

View File

@@ -0,0 +1,40 @@
<?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);
// Load custom fonts into the document
\NRFramework\Fonts::loadFont($field->font_family);
$styles = [
'font-size: ' . (int) $field->font_size . 'px',
'font-family: ' . $field->font_family,
'line-height: ' . (int) $field->line_height . 'px',
'letter-spacing:' . (int) $field->letter_spacing . 'px',
'text-align:' . $field->content_alignment
];
// init vars
$link_start = $link_end = '';
// link
if ($field->use_link == '1')
{
$link_atts = ($field->open_new_tab == '1') ? 'target="_blank"' : '';
$link_start = '<a href="' . $field->link_url . '"' . $link_atts . '>';
$link_end = '</a>';
}
?>
<<?php echo $field->heading_type; ?> style="<?php echo implode(';', $styles); ?>"><?php echo $link_start . $field->label . $link_end; ?></<?php echo $field->heading_type; ?>>

View File

@@ -0,0 +1,25 @@
<?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('Restricted access');
extract($displayData);
?>
<input type="hidden" name="<?php echo $field->input_name ?>" class="cf-input" value="<?php echo $field->value; ?>"
<?php if (isset($field->htmlattributes) && !empty($field->htmlattributes)) { ?>
<?php foreach ($field->htmlattributes as $key => $value) { ?>
<?php echo $key ?>="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8') ?>"
<?php } ?>
<?php } ?>
>

View File

@@ -0,0 +1,54 @@
<?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('Restricted access');
extract($displayData);
?>
<input type="number" name="<?php echo $field->input_name ?>" id="<?php echo $field->input_id; ?>"
<?php if (isset($field->required) && $field->required) { ?>
required
<?php } ?>
<?php if (isset($field->placeholder)) { ?>
placeholder="<?php echo htmlspecialchars($field->placeholder, ENT_COMPAT, 'UTF-8'); ?>"
<?php } ?>
<?php if (isset($field->step) && is_numeric($field->step)) { ?>
step="<?php echo (float) $field->step; ?>"
<?php } ?>
<?php if (isset($field->min) && is_numeric($field->min)) { ?>
min="<?php echo (float) $field->min; ?>"
<?php } ?>
<?php if (isset($field->max) && is_numeric($field->max)) { ?>
max="<?php echo (float) $field->max; ?>"
<?php } ?>
<?php if (isset($field->value) && $field->value != '') { ?>
value="<?php echo $field->value; ?>"
<?php } ?>
<?php if (isset($field->readonly) && $field->readonly == '1') { ?>
readonly
<?php } ?>
<?php if (isset($field->htmlattributes) && !empty($field->htmlattributes)) { ?>
<?php foreach ($field->htmlattributes as $key => $value) { ?>
<?php echo $key ?>="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8') ?>"
<?php } ?>
<?php } ?>
class="<?php echo $field->class ?>"
>

View File

@@ -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 © 2020 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);
$choiceLayout = (isset($field->choicelayout) && !empty($field->choicelayout)) ? 'cf-list-' . $field->choicelayout . '-columns' : '';
?>
<div class="cf-list <?php echo $choiceLayout; ?>">
<?php foreach ($field->choices as $choiceKey => $choice) { ?>
<div class="cf-radio-group">
<input type="radio" name="<?php echo $field->input_name ?>[]" id="<?php echo $field->input_id . "_" . $choiceKey ?>"
value="<?php echo htmlspecialchars($choice['value']); ?>"
data-calc-value="<?php echo htmlspecialchars($choice['calc-value']) ?>"
<?php if ($choice['value'] == $field->value) { ?> checked <?php } ?>
<?php if (isset($field->required) && $field->required) { ?>
required
<?php } ?>
class="<?php echo $field->class; ?>"
>
<label class="cf-label" for="<?php echo $field->input_id . "_" . $choiceKey; ?>">
<?php echo $choice['label'] ?>
</label>
</div>
<?php } ?>
</div>

View File

@@ -0,0 +1,25 @@
<?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('Restricted access');
extract($displayData);
$atts = [
'min' => $field->min,
'max' => $field->max,
'step' => $field->step,
];
echo $class->toWidget($atts);
?>

View File

@@ -0,0 +1,37 @@
<?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);
$css = @file_get_contents(JPATH_ROOT . '/media/plg_system_nrframework/css/widgets/slider.css');
echo '
<style>
' . $css . '
.nrf-slider-wrapper.' . $field->input_id . ' {
--input-bg-color: ' . $field->form['params']->get('inputbg') . ';
--input-border-color: ' . $field->form['params']->get('inputbordercolor') . ';
}
</style>
';
$atts = [
'min' => $field->min,
'max' => $field->max,
'step' => $field->step,
];
echo $class->toWidget($atts);
?>

View File

@@ -0,0 +1,30 @@
<?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('Restricted access');
extract($displayData);
$atts = [
'half_ratings' => $field->half_ratings,
'icon' => basename($field->icon, '.svg'),
'size' => (int) $field->size,
'selected_color' => $field->selected_color,
'unselected_color' => $field->unselected_color,
'max_rating' => $field->max_rating,
'load_css_vars' => true,
];
echo $class->toWidget($atts);
?>

View File

@@ -0,0 +1,40 @@
<?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('Restricted access');
extract($displayData);
$css = @file_get_contents(JPATH_ROOT . '/media/plg_system_nrframework/css/widgets/rating.css');
echo '
<style>
' . $css . '
.nrf-rating-wrapper.' . $field->input_id . ' {
--rating-selected-color: ' . $field->selected_color . ';
--rating-unselected-color: ' . $field->unselected_color . ';
--rating-size: ' . $field->size . 'px;
}
</style>
';
$atts = [
'icon' => basename($field->icon, '.svg'),
'size' => (int) $field->size,
'selected_color' => $field->selected_color,
'unselected_color' => $field->unselected_color,
'max_rating' => $field->max_rating
];
echo $class->toWidget($atts);
?>

View File

@@ -0,0 +1,37 @@
<?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('Restricted access');
extract($displayData);
if (!$class->getSiteKey() || !$class->getSecretKey())
{
echo JText::_('COM_CONVERTFORMS_FIELD_RECAPTCHA') . ': ' . JText::_('COM_CONVERTFORMS_FIELD_RECAPTCHA_KEYS_NOTE');
return;
}
JText::script('COM_CONVERTFORMS_RECAPTCHA_NOT_LOADED');
JHtml::_('script', 'plg_captcha_recaptcha/recaptcha.min.js', ['version' => 'auto', 'relative' => true]);
$callback = defined('nrJ4') ? 'init' : 'Init'; // Why the hell did you guys rename the method?
JHtml::_('script', 'https://www.google.com/recaptcha/api.js?onload=Joomla' . $callback . 'ReCaptcha2&render=explicit&hl=' . JFactory::getLanguage()->getTag());
JHtml::_('script', 'com_convertforms/recaptcha_v2_checkbox.js', ['version' => 'auto', 'relative' => true]);
?>
<div class="nr-recaptcha g-recaptcha"
data-sitekey="<?php echo $class->getSiteKey(); ?>"
data-theme="<?php echo $field->theme ?>"
data-size="<?php echo $field->size ?>">
</div>

View File

@@ -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 © 2020 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);
$size = $field->size === 'normal' ? '' : '_' . $field->size;
$imageURL = JURI::root() . 'media/com_convertforms/img/recaptcha_' . $field->theme . $size . '.png';
?>
<img src="<?php echo $imageURL ?>" style="align-self: flex-start;" />

View File

@@ -0,0 +1,28 @@
<?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('Restricted access');
extract($displayData);
if (!$class->getSiteKey() || !$class->getSecretKey())
{
echo JText::_('COM_CONVERTFORMS_FIELD_RECAPTCHA') . ': ' . JText::_('COM_CONVERTFORMS_FIELD_RECAPTCHA_KEYS_NOTE');
return;
}
JHtml::_('script', 'com_convertforms/recaptcha_v2_invisible.js', ['version' => 'auto', 'relative' => true]);
JHtml::_('script', 'https://www.google.com/recaptcha/api.js?onload=ConvertFormsInitInvisibleReCaptcha&render=explicit&hl=' . JFactory::getLanguage()->getTag());
?>
<div class="g-invisible-recaptcha" data-sitekey="<?php echo $class->getSiteKey(); ?>" data-badge="<?php echo $field->badge ?>"></div>

View File

@@ -0,0 +1,42 @@
<?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('Restricted access');
extract($displayData);
$imageURL = JURI::root() . 'media/com_convertforms/img/recaptcha_invisible.png';
?>
<?php if ($field->badge != 'inline') { ?>
<div class="badge_<?php echo $field->badge ?>"></div>
<style>
.badge_bottomleft, .badge_bottomright {
position: absolute;
bottom: 30px;
left: 0;
width: 70px;
height: 60px;
overflow: hidden;
background-image:url("<?php echo $imageURL ?>");
border:solid 1px #ccc;
}
.badge_bottomright {
left:auto;
right:0;
}
</style>
<?php } else { ?>
<img src="<?php echo $imageURL ?>" style="align-self: flex-start;" />
<?php } ?>

View File

@@ -0,0 +1,88 @@
<?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('Restricted access');
extract($displayData);
// Styles
$buttonContainerClasses = array(
'cf-text-' . $field->align,
);
$buttonStyles = array(
'border-radius:' . (int) $field->borderradius . 'px',
'padding:' . (int) $field->vpadding . 'px ' . (int) $field->hpadding . 'px',
'color:' . $field->textcolor,
'font-size:' . (int) $field->fontsize . 'px'
);
if (in_array($field->btnstyle, array('gradient', 'flat')))
{
$buttonStyles[] = 'background-color:' . $field->bg;
$styles = '
#cf_' . $form['id'] . ' .cf-btn:after {
border-radius: ' . (int) $form['params']->get('btnborderradius', '5') . 'px'.'
}
';
}
if ($field->btnstyle == 'outline')
{
$buttonStyles[] = 'border: solid 1px ' . $field->bg;
$buttonStyles[] = 'background: none';
$styles = '
#cf_' . $form['id'] . ' .cf-btn:hover {
background-color: ' . $field->bg . ' !important;
color: ' . $field->texthovercolor . ' !important;
}
';
}
$buttonClasses = [
'cf-btn-style-' . $field->btnstyle,
$field->size,
isset($field->inputcssclass) ? $field->inputcssclass : null
];
?>
<div class="<?php echo implode(' ', $buttonContainerClasses) ?>">
<button type="submit" class="cf-btn <?php echo implode(" ", $buttonClasses) ?>" style="<?php echo implode(";", $buttonStyles) ?>">
<span class="cf-btn-text"><?php echo JText::_($field->text) ?></span>
<span class="cf-spinner-container">
<span class="cf-spinner">
<span class="bounce1"></span>
<span class="bounce2"></span>
<span class="bounce3"></span>
</span>
</span>
</button>
</div>
<?php
if (isset($styles) && !empty($styles))
{
if (JFactory::getApplication()->isClient('site'))
{
ConvertForms\Helper::addStyleDeclarationOnce($styles);
} else
{
// On backend add styles inline
echo '<style>' . $styles . '</style>';
}
}
?>

View File

@@ -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 © 2020 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);
?>
<input type="<?php echo $field->type; ?>" name="<?php echo $field->input_name ?>" id="<?php echo $field->input_id; ?>"
<?php if (isset($field->required) && $field->required) { ?>
required
<?php } ?>
<?php if (isset($field->placeholder) && $field->placeholder != '') { ?>
placeholder="<?php echo htmlspecialchars($field->placeholder, ENT_COMPAT, 'UTF-8'); ?>"
<?php } ?>
<?php if (isset($field->value) && $field->value != '') { ?>
value="<?php echo $field->value; ?>"
<?php } ?>
<?php if (isset($field->browserautocomplete) && $field->browserautocomplete == '1') { ?>
autocomplete="off"
<?php } ?>
<?php if (isset($field->inputmask) && $field->inputmask != '') { ?>
data-inputmask-mask="<?php echo $field->inputmask ?>"
<?php } ?>
<?php if (isset($field->readonly) && $field->readonly == '1') { ?>
readonly
<?php } ?>
<?php if (isset($field->minchars) && $field->minchars > 0) { ?>
minlength="<?php echo $field->minchars; ?>"
<?php } ?>
<?php if (isset($field->maxchars) && $field->maxchars > 0) { ?>
maxlength="<?php echo $field->maxchars; ?>"
<?php } ?>
<?php if (isset($field->htmlattributes) && !empty($field->htmlattributes)) { ?>
<?php foreach ($field->htmlattributes as $key => $value) { ?>
<?php echo $key ?>="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8') ?>"
<?php } ?>
<?php } ?>
class="<?php echo $field->class ?>"
>

View File

@@ -0,0 +1,45 @@
<?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('Restricted access');
extract($displayData);
?>
<textarea name="<?php echo $field->input_name ?>" id="<?php echo $field->input_id; ?>"
<?php if (isset($field->required) && $field->required) { ?>
required
<?php } ?>
<?php if (isset($field->placeholder)) { ?>
placeholder="<?php echo htmlspecialchars($field->placeholder, ENT_COMPAT, 'UTF-8'); ?>"
<?php } ?>
<?php if (isset($field->readonly) && $field->readonly == '1') { ?>
readonly
<?php } ?>
<?php if (isset($field->minchars) && $field->minchars > 0) { ?>
minlength="<?php echo $field->minchars; ?>"
<?php } ?>
<?php if (isset($field->maxchars) && $field->maxchars > 0) { ?>
maxlength="<?php echo $field->maxchars; ?>"
<?php } ?>
class="<?php echo $field->class ?>"
rows="<?php echo $field->textareaheight ?>"><?php
if (isset($field->value))
{
echo $field->value;
}
?></textarea>

View File

@@ -0,0 +1,36 @@
<?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('Restricted access');
?>
<div class="text-center pt-4">
<div style="padding:15px;">
<p>
<?php echo JText::sprintf("NR_USING_THE_FREE_VERSION", JText::_("COM_CONVERTFORMS")) ?>
</p>
<?php NRFramework\HTML::renderProButton(); ?>
</div>
<?php echo JText::_('COM_CONVERTFORMS') . " v" . NRFramework\Functions::getExtensionVersion("com_convertforms", true) ?>
<br>
<?php if ($this->config->get("showcopyright", true)) { ?>
<div class="footer_review">
<?php echo JText::_("NR_LIKE_THIS_EXTENSION") ?>
<a href="https://extensions.joomla.org/extensions/extension/contacts-and-feedback/forms/convert-forms/" target="_blank"><?php echo JText::_("NR_LEAVE_A_REVIEW") ?></a>
<a href="https://extensions.joomla.org/extensions/extension/contacts-and-feedback/forms/convert-forms/" target="_blank" class="stars"><span class="icon-star"></span><span class="icon-star"></span><span class="icon-star"></span><span class="icon-star"></span><span class="icon-star"></span></a>
</div>
<Br>
&copy; <?php echo JText::sprintf('NR_COPYRIGHT', date("Y")) ?></p>
<?php } ?>
</div>

View File

@@ -0,0 +1,98 @@
<?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('Restricted access');
extract($displayData);
?>
<div <?php echo trim($boxattributes) ?> data-id="<?php echo $id ?>">
<form name="cf<?php echo $id; ?>" id="cf<?php echo $id; ?>" method="post" action="#">
<?php if ($hascontent) { ?>
<div class="cf-content-wrap cf-col-16 <?php echo $contentclasses ?>">
<div class="cf-content cf-col-16">
<?php if (isset($image)) { ?>
<div class="cf-content-img cf-col-16 cf-text-center <?php echo $imagecontainerclasses; ?>">
<img
alt="<?php echo $params->get("imagealt"); ?>"
class="<?php echo implode(" ", $imageclasses) ?>"
style="<?php echo implode(";", $imagestyles) ?>"
src="<?php echo $image ?>"
/>
</div>
<?php } ?>
<?php if (!$textIsEmpty) { ?>
<div class="cf-content-text cf-col <?php echo $textcontainerclasses; ?>" >
<?php echo $params->get("text"); ?>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="cf-form-wrap cf-col-16 <?php echo implode(" ", $formclasses) ?>" style="<?php echo implode(";", $formstyles) ?>">
<div class="cf-response"></div>
<?php if (isset($fields_prepare)) { ?>
<div class="cf-fields">
<?php echo $fields_prepare; ?>
</div>
<?php } ?>
<?php if (!$footerIsEmpty) { ?>
<div class="cf-footer">
<?php echo $params->get("footer"); ?>
</div>
<?php } ?>
</div>
<input type="hidden" name="cf[form_id]" value="<?php echo $id ?>">
<?php
echo JHtml::_('form.token');
if (JFactory::getApplication()->isClient('site'))
{
echo $params->get('customcode', '');
}
?>
<?php if ((bool) $params->get('honeypot', true)) {
// Since the stylesheet may be disabled, ensure the honeypot field is hidden by injecting the CSS.
$css = '.cf-field-hp {
display: none;
position: absolute;
left: -9000px;
}';
$params->set('customcss', $params->get('customcss') . $css);
?>
<div class="cf-field-hp">
<?php
$hp_id = 'cf-field-' . uniqid();
$labels = ['Name', 'First Name', 'Last Name', 'Email', 'Phone', 'Website', 'Message'];
$label = $labels[array_rand($labels)];
?>
<label for="<?php echo $hp_id; ?>" class="cf-label"><?php echo $label; ?></label>
<input type="text" name="cf[hnpt]" id="<?php echo $hp_id; ?>" autocomplete="off" class="cf-input"/>
</div>
<?php } ?>
</form>
<?php
if (JFactory::getApplication()->isClient('site'))
{
ConvertForms\Helper::addStyleDeclarationOnce($params->get('customcss'));
} else {
// Help user style the form in the backend as well.
echo '<style>' . $params->get('customcss') . '</style>';
}
?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
/**
* @package Convert Forms
* @version 3.2.12 Free
*
* @author Tassos Marinos <info@tassos.gr>
* @link http://www.tassos.gr
* @copyright Copyright © 2022 Tassos Marinos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php if (isset($field->description) && !empty($field->description)) { ?>
<div class="cf-control-input-desc">
<?php echo $field->description; ?>
</div>
<?php } ?>

View File

@@ -0,0 +1,57 @@
<?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('Restricted access');
extract($displayData);
?>
<div class="fmItem" data-key="<?php echo $loadData['key']; ?>">
<?php
echo $header;
foreach ($form->getFieldsets() as $fieldset)
{
// Skip fieldset is has no fields
if (!$form->getFieldset($fieldset->name))
{
continue;
}
$label = $fieldset->name == 'basic' ? JText::_('COM_CONVERTFORMS_FIELD_' . $fieldTypeName) : ucfirst($fieldset->name);
?>
<h3>
<?php echo $label; ?>
<?php if ($fieldset->name == 'basic') { ?>
<small>(ID: <?php echo $loadData['key']; ?>)</small>
<ul class="cf-menu">
<li class="cf-menu-parent">
<a href="#" class="cf-icon-dots cf-menu-item" data-bs-toggle="dropdown" data-toggle="dropdown"></a>
<ul class="<?php echo defined('nrJ4') ? 'dropdown-menu' : '' ?>">
<li>
<a href="#" class="copyField"><?php echo JText::_('COM_CONVERTFORMS_FIELDS_COPY') ?></a>
</li>
<li>
<a href="#" class="removeField" data-focusnext="true"><?php echo JText::_('COM_CONVERTFORMS_FIELDS_DELETE') ?></a>
</li>
</ul>
</li>
</ul>
<?php } ?>
</h3>
<div class="fmItemForm">
<?php echo $form->renderFieldset($fieldset->name); ?>
</div>
<?php } ?>
</div>