* @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\Associations; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; $this->useCoreUI = true; Text::script('ERROR'); Text::script('JGLOBAL_VALIDATION_FORM_FAILED'); $this->document->addScriptOptions('menu-item', ['itemId' => (int) $this->item->id]); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('keepalive') ->useScript('form.validate') ->useScript('com_menus.admin-item-edit'); $assoc = Associations::isEnabled(); $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' : ''; $clientId = $this->state->get('item.client_id', 0); $lang = Factory::getLanguage()->getTag(); // Load mod_menu.ini file when client is administrator if ($clientId === 1) { Factory::getLanguage()->load('mod_menu', JPATH_ADMINISTRATOR); } ?>
item->id != 0) : ?>
'details', 'recall' => true, 'breakpoint' => 768]); ?>
form->renderField('type'); if ($this->item->type == 'alias') { echo $this->form->renderField('aliasoptions', 'params'); } if ($this->item->type == 'separator') { echo $this->form->renderField('text_separator', 'params'); } echo $this->form->renderFieldset('request'); if ($this->item->type == 'url') { $this->form->setFieldAttribute('link', 'readonly', 'false'); $this->form->setFieldAttribute('link', 'required', 'true'); } echo $this->form->renderField('link'); if ($this->item->type == 'alias') { echo $this->form->renderField('alias_redirect', 'params'); } echo $this->form->renderField('browserNav'); echo $this->form->renderField('template_style_id'); if (!$isModal && $this->item->type == 'container') { echo $this->loadTemplate('container'); } ?>
fields = array( 'id', 'client_id', 'menutype', 'parent_id', 'menuordering', 'published', 'publish_up', 'publish_down', 'home', 'access', 'language', 'note', ); if ($this->item->type != 'component') { $this->fields = array_diff($this->fields, array('home')); $this->form->setFieldAttribute('publish_up', 'showon', ''); $this->form->setFieldAttribute('publish_down', 'showon', ''); } ?> fields = array( 'id', 'client_id', 'menutype', 'parent_id', 'menuordering', 'published', 'home', 'publish_up', 'publish_down', 'access', 'language', 'note', ); if ($this->item->type != 'component') { $this->fields = array_diff($this->fields, array('home')); $this->form->setFieldAttribute('publish_up', 'showon', ''); $this->form->setFieldAttribute('publish_down', 'showon', ''); } echo LayoutHelper::render('joomla.edit.global', $this); ?>
fieldsets = array(); $this->ignore_fieldsets = array('aliasoptions', 'request', 'item_associations'); echo LayoutHelper::render('joomla.edit.params', $this); ?> state->get('item.client_id') != 1) : ?>
modules)) : ?>
loadTemplate('modules'); ?>
form->getInput('component_id'); ?>