| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/nimes/plugins/system/nrframework/fields/ |
Upload File : |
<?php
/**
* @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
*/
// No direct access to this file
defined('_JEXEC') or die;
JFormHelper::loadFieldClass('text');
class JFormFieldNRText extends JFormFieldText
{
/**
* Method to render the input field
*
* @return string
*/
public function getInput()
{
// This line added to help us support the K2 Items and Joomla! Articles dropdown listbox array values
$this->value = is_array($this->value) ? implode(',', $this->value) : $this->value;
// Adds an extra info label next to input
$addon = (string) $this->element['addon'];
$parent = parent::getInput();
if (!empty($addon))
{
$html[] = '
<div class="input-append input-group">
' . $parent . '
<span class="add-on input-group-append">
<span class="input-group-text" style="font-size:inherit;">' . JText::_($addon) . '</span>
</span>
</div>';
} else
{
$html[] = parent::getInput();
}
// Adds a link next to input
$url = $this->element['url'];
$text = $this->element['urltext'];
$target = $this->element['urltarget'] ? $this->element['urltarget'] : "_blank";
$class = $this->element['urlclass'] ? $this->element['urlclass'] : "";
$attributes = "";
// Popup mode
if ($this->element["urlpopup"])
{
$class .= " nrPopup";
$attributes = 'data-width="600" data-height="600"';
$this->addPopupScript();
}
if ($url && $text)
{
$html[] = '<a ' . $attributes . ' class="' . $class . '" style="margin-left:10px;" href="' . $url . '" target="' . $target . '">' . JText::_($text) . '</a>';
}
return implode('', $html);
}
private function addPopupScript()
{
static $run;
if ($run)
{
return;
}
$run = true;
JFactory::getDocument()->addScriptDeclaration('
jQuery(function($) {
$(".nrPopup").click(function() {
url = $(this).attr("href");
width = $(this).data("width");
height = $(this).data("height");
window.open(""+url+"", "nrPopup", "width=" + width + ", height=" + height + "");
return false;
})
})
');
}
}