Server : Apache System : Linux webm012.cluster129.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : eventfrsgx ( 61451) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/eventfrsgx/www/administrator/components/com_spsimpleportfolio/models/fields/ |
<?php
/**
* @package SP Simple Portfolio
*
* @copyright Copyright (C) 2010 - 2022 JoomShaper. All rights reserved.
* @license GNU General Public License version 2 or later.
*/
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormField;
use Joomla\CMS\HTML\HTMLHelper;
class JFormFieldResetthumbs extends FormField {
protected $type = 'Resetthumbs';
protected function getInput() {
HTMLHelper::_('jquery.framework');
$doc = Factory::getDocument();
$doc->addScriptDeclaration('jQuery(function($) {
$("#btn-reset-thumbs").on("click", function() {
$(this).attr("disabled","disabled").text($(this).data("generating"));
});
});');
$url = 'index.php?option=com_spsimpleportfolio&task=resetThumbs';
return '<a id="btn-reset-thumbs" class="btn btn-primary" data-generating="'. Text::_('COM_SPPORTFOLIO_RESET_THUMBNAIL_TEXT_LOADING') .'" href="'. $url .'">'. Text::_('COM_SPPORTFOLIO_RESET_THUMBNAIL_TEXT') .'</a>';
}
}