diff --git a/administrator/components/com_menus/Field/MenutypeField.php b/administrator/components/com_menus/Field/MenutypeField.php
index 034a3d56d39..435474423b3 100644
--- a/administrator/components/com_menus/Field/MenutypeField.php
+++ b/administrator/components/com_menus/Field/MenutypeField.php
@@ -45,7 +45,7 @@ class MenutypeField extends ListField
protected function getInput()
{
HTMLHelper::_('webcomponent', 'system/joomla-dropdown.min.js', array('version' => 'auto', 'relative' => true));
- HTMLHelper::_('script', 'com_menus/admin-item-modal.js', ['version' => 'auto', 'relative' => true]);
+ HTMLHelper::_('script', 'com_menus/admin-item-edit.js', ['version' => 'auto', 'relative' => true]);
$html = array();
$recordId = (int) $this->form->getValue('id');
@@ -143,6 +143,7 @@ protected function getInput()
$html[] = '';
+
$html[] = '';
diff --git a/administrator/components/com_menus/tmpl/item/edit.php b/administrator/components/com_menus/tmpl/item/edit.php
index 1987910c62c..e5a008529ef 100644
--- a/administrator/components/com_menus/tmpl/item/edit.php
+++ b/administrator/components/com_menus/tmpl/item/edit.php
@@ -179,7 +179,7 @@
}
echo LayoutHelper::render('joomla.edit.global', $this);
-
+
?>
diff --git a/build/media_source/com_menus/js/admin-item-edit.es6.js b/build/media_source/com_menus/js/admin-item-edit.es6.js
index da45e9fe93d..d9d6fd8829d 100644
--- a/build/media_source/com_menus/js/admin-item-edit.es6.js
+++ b/build/media_source/com_menus/js/admin-item-edit.es6.js
@@ -5,6 +5,15 @@
((Joomla) => {
'use strict';
+
+ Joomla.setMenuType = (type, tmpl) => {
+ if (tmpl !== '') {
+ Joomla.submitbutton('item.setType', type);
+ } else {
+ window.location = `index.php?option=com_menus&view=item&task=item.setType&layout=edit&type=${type}`;
+ }
+ };
+
Joomla.submitbutton = (task, type) => {
if (task === 'item.setType' || task === 'item.setMenuType') {
if (task === 'item.setType') {