Server : LiteSpeed System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : alsaif ( 1057) PHP Version : 7.4.33 Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/alsaif/public_html/administrator/components/com_convertforms/layouts/fields/ |
<?php
/**
* @package Convert Forms
* @version 4.3.3 Pro
*
* @author Tassos Marinos <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2023 Tassos 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>';
}
}
?>