* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; HTMLHelper::_('behavior.combobox'); $hasContent = isset($this->item->xml->customContent); $hasContentFieldName = 'content'; // For a later improvement if ($hasContent) { $hasContentFieldName = 'content'; } // Get Params Fieldsets $this->fieldsets = $this->form->getFieldsets('params'); $this->useCoreUI = true; Text::script('JYES'); Text::script('JNO'); Text::script('JALL'); Text::script('JTRASHED'); $this->document->addScriptOptions('module-edit', ['itemId' => $this->item->id, 'state' => (int) $this->item->id == 0 ? 'Add' : 'Edit']); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('keepalive') ->useScript('form.validate') ->useScript('com_modules.admin-module-edit'); $input = Factory::getApplication()->input; // In case of modal $isModal = $input->get('layout') === 'modal'; $layout = $isModal ? 'modal' : 'edit'; $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : ''; ?>