__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php /** * @package Helix_Ultimate_Framework * @author JoomShaper <[email protected]> * @copyright Copyright (c) 2010 - 2021 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ defined('_JEXEC') or die(); use Joomla\CMS\Factory; use Joomla\CMS\Form\FormField; /** * Form field for helix presets. * * @since 2.0.0 */ class JFormFieldHelixUnit extends FormField { /** * Field type * * @var string $type * @since 2.0.0 */ protected $type = 'HelixUnit'; /** * Override getInput function form FormField * * @return string Field HTML string * @since 2.0.0 */ protected function getInput() { // By default the unit is px. $unit = 'px'; $value = $this->value; $name = $this->name; $hint = $this->getAttribute('hint', '', 'STRING'); if (isset($value)) { $matches = []; if (preg_match("@^([+-]?(?:\d+|\d*\.\d+))(px|em|rem|%)$@", $value, $matches)) { if (count($matches) >= 3) { $value = $matches[1]; if (isset($matches[2])) { $unit = strtolower($matches[2]); } } } elseif (is_numeric($value)) { $value = (float) $value; } else { $value = ''; } } $value = !isset($value) ? '' : $value; $finalValue = $value !== '' ? $value . $unit : ''; $output = ''; $output .= '<div class="hu-input-group hu-unit-group">'; $output .= ' <input type="hidden" class="hu-unit-field-value" name="' . $name . '" value="' . $finalValue . '"/>'; $output .= ' <input type="text" class="hu-field-dimension-width form-control hu-unit-field-input ' . $name . '" value="' . $value . '" ' . ($hint !== '' ? 'placeholder="' . $hint . '"' : '') . ' />'; $output .= ' <select class="hu-unit-select">'; $output .= ' <option value="px" ' . ($unit === 'px' ? 'selected' : '') . '>px</option>'; $output .= ' <option value="em" ' . ($unit === 'em' ? 'selected' : '') . '>em</option>'; $output .= ' <option value="rem" ' . ($unit === 'rem' ? 'selected' : '') . '>rem</option>'; $output .= ' <option value="%" ' . ($unit === '%' ? 'selected' : '') . '>%</option>'; $output .= ' </select>'; $output .= '</div>'; return $output; } }
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| helixbutton.php | File | 1.13 KB | 0664 |
|
| helixdetails.php | File | 1.43 KB | 0664 |
|
| helixdevices.php | File | 3.83 KB | 0664 |
|
| helixdimension.php | File | 1.93 KB | 0664 |
|
| helixexportimport.php | File | 1.59 KB | 0664 |
|
| helixfont.php | File | 14.05 KB | 0664 |
|
| helixgallery.php | File | 2.98 KB | 0664 |
|
| helixheaders.php | File | 3.25 KB | 0664 |
|
| helixicon.php | File | 1.08 KB | 0664 |
|
| heliximage.php | File | 2.33 KB | 0664 |
|
| helixlayout.php | File | 2.02 KB | 0664 |
|
| helixmedia.php | File | 1.31 KB | 0664 |
|
| helixmegamenu.php | File | 6.52 KB | 0664 |
|
| helixmenubuilder.php | File | 1.03 KB | 0664 |
|
| helixoffcanvas.php | File | 2.33 KB | 0664 |
|
| helixpositions.php | File | 1.9 KB | 0664 |
|
| helixpresets.php | File | 7.81 KB | 0664 |
|
| helixswitcher.php | File | 3.35 KB | 0664 |
|
| helixunit.php | File | 2.14 KB | 0664 |
|