Commit 1c95b46b authored by alexpott's avatar alexpott

Issue #2346001 by Frederico | realityloop: Fixed Menu link title not...

Issue #2346001 by Frederico | realityloop: Fixed Menu link title not prepopulated from node title, and menu isn't created.
parent 10cfcd6a
......@@ -7,7 +7,7 @@
$(context).find('.menu-link-form').drupalSetSummary(function (context) {
var $context = $(context);
if ($context.find('.form-item-menu-enabled input').is(':checked')) {
return Drupal.checkPlain($context.find('.form-item-menu-link-title input').val());
return Drupal.checkPlain($context.find('.form-item-menu-title input').val());
}
else {
return Drupal.t('Not in menu');
......@@ -27,8 +27,8 @@
// Try to find menu settings widget elements as well as a 'title' field in
// the form, but play nicely with user permissions and form alterations.
var $checkbox = $this.find('.form-item-menu-enabled input');
var $link_title = $context.find('.form-item-menu-link-title input');
var $title = $this.closest('form').find('.form-item-title input');
var $link_title = $context.find('.form-item-menu-title input');
var $title = $this.closest('form').find('.form-item-title-0-value input');
// Bail out if we do not have all required fields.
if (!($checkbox.length && $link_title.length && $title.length)) {
return;
......
......@@ -319,7 +319,7 @@ function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) {
'#open' => (bool) $definition['id'],
'#group' => 'advanced',
'#attached' => array(
'library' => array('menu/drupal.menu'),
'library' => array('menu_ui/drupal.menu_ui'),
),
'#tree' => TRUE,
'#weight' => -2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment