diff --git a/core/includes/form.inc b/core/includes/form.inc index 513615c..449e77c 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -2628,6 +2628,23 @@ function _form_options_flatten($array) { } /** + * Process simplified form wrappers for overlay. + */ +function form_process_simplified_form($element) { + if (!empty($element['#simplified']) && module_invoke('overlay', 'get_mode') == 'child') { + $element['advanced_fields_start'] = array( + '#markup' => '
' . t('Advanced settings') . '
', + '#weight' => 1, + ); + $element['advanced_fields_end'] = array( + '#markup' => '
', + '#weight' => 100, + ); + } + return $element; +} + +/** * Processes a select list form element. * * This process callback is mandatory for select fields, since all user agents diff --git a/core/modules/block/block.admin.inc b/core/modules/block/block.admin.inc index e5e8d76..de0b656 100644 --- a/core/modules/block/block.admin.inc +++ b/core/modules/block/block.admin.inc @@ -78,7 +78,7 @@ function block_admin_edit(Block $entity) { } // Get the block subject for the page title. - drupal_set_title(t("Configure %label block in %theme", array('%label' => $entity->label(), '%theme' => $theme_title)), PASS_THROUGH); + drupal_set_title(t("Edit %label block in %theme", array('%label' => $entity->label(), '%theme' => $theme_title)), PASS_THROUGH); return entity_get_form($entity); } diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 6bc94f2..8d8ff75 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -129,14 +129,14 @@ function block_menu() { 'file' => 'block.admin.inc', ); $items['admin/structure/block/manage/%block'] = array( - 'title' => 'Configure block', + 'title' => 'Edit block', 'page callback' => 'block_admin_edit', 'page arguments' => array(4), 'access arguments' => array('administer blocks'), 'file' => 'block.admin.inc', ); $items['admin/structure/block/manage/%block/configure'] = array( - 'title' => 'Configure block', + 'title' => 'Edit block', 'type' => MENU_DEFAULT_LOCAL_TASK, 'context' => MENU_CONTEXT_INLINE, ); diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 9e5bf6c..36a3f43 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -233,6 +233,8 @@ public function form($form, &$form_state) { '#type' => 'value', '#value' => $definition['module'], ); + // Make form simplified if in contextual administration. + $form['#simplified'] = TRUE; $form['label'] = array( '#type' => 'textfield', @@ -262,6 +264,7 @@ public function form($form, &$form_state) { '#default_value' => $entity->get('region'), '#empty_value' => BLOCK_REGION_NONE, '#options' => system_region_list($entity->get('theme'), REGIONS_VISIBLE), + '#weight' => 5, ); // Visibility settings. diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php index 11853b5..b6f1044 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php @@ -254,7 +254,7 @@ private function doAdminTests($user) { // Add forum to the Tools menu. $edit = array(); - $this->drupalPost('admin/structure/menu/manage/tools', $edit, t('Save configuration')); + $this->drupalPost('admin/structure/menu/manage/tools', $edit, t('Save')); $this->assertResponse(200); // Edit forum taxonomy. diff --git a/core/modules/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php index 41e5696..49eec72 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php @@ -21,6 +21,7 @@ class MenuFormController extends EntityFormController { public function form(array $form, array &$form_state, EntityInterface $menu) { $form = parent::form($form, $form_state, $menu); $system_menus = menu_list_system_menus(); + $form_state['menu'] = &$menu; $form['label'] = array( '#type' => 'textfield', @@ -46,10 +47,23 @@ public function form(array $form, array &$form_state, EntityInterface $menu) { '#disabled' => !$menu->isNew() || isset($system_menus[$menu->id()]), ); $form['description'] = array( - '#type' => 'textarea', + '#type' => 'textfield', '#title' => t('Description'), '#default_value' => $menu->description, ); + + // Add menu links administration form for existing menus. + if (!$menu->isNew() || isset($system_menus[$menu->id()])) { + // Form API supports to construct and validate self-contained sections + // within forms, but does not allow to handle the form section's submission + // equally separated yet. Therefore, we use a $form_state key to point to + // the parents of the form section. + // @see menu_overview_form_submit() + $form_state['menu_overview_form_parents'] = array('links'); + $form['links'] = array(); + $form['links'] = menu_overview_form($form['links'], $form_state); + } + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', @@ -71,6 +85,11 @@ public function form(array $form, array &$form_state, EntityInterface $menu) { */ public function save(array $form, array &$form_state) { $menu = $this->getEntity($form_state); + $system_menus = menu_list_system_menus(); + + if (!$menu->isNew() || isset($system_menus[$menu->id()])) { + menu_overview_form_submit($form, $form_state); + } if ($menu->isNew()) { // Add 'menu-' to the menu name to help avoid name-space conflicts. diff --git a/core/modules/menu/lib/Drupal/menu/MenuListController.php b/core/modules/menu/lib/Drupal/menu/MenuListController.php index a833dbc..b64dbd0 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuListController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuListController.php @@ -47,13 +47,8 @@ public function getOperations(EntityInterface $entity) { $operations = parent::getOperations($entity); $uri = $entity->uri(); - $operations['list'] = array( - 'title' => t('list links'), - 'href' => $uri['path'], - 'options' => $uri['options'], - 'weight' => 0, - ); $operations['edit']['title'] = t('edit menu'); + $operatuins['edit']['href'] = $uri['path']; $operations['add'] = array( 'title' => t('add link'), 'href' => $uri['path'] . '/add', diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php index a0d8d28..310f4ae 100644 --- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php +++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php @@ -123,14 +123,14 @@ function addCustomMenuCRUD() { $menu->save(); // Assert the new menu. - $this->drupalGet('admin/structure/menu/manage/' . $menu_name . '/edit'); + $this->drupalGet('admin/structure/menu/manage/' . $menu_name); $this->assertRaw($label, 'Custom menu was added.'); // Edit the menu. $new_label = $this->randomName(16); $menu->set('label', $new_label); $menu->save(); - $this->drupalGet('admin/structure/menu/manage/' . $menu_name . '/edit'); + $this->drupalGet('admin/structure/menu/manage/' . $menu_name); $this->assertRaw($new_label, 'Custom menu was edited.'); } @@ -261,10 +261,10 @@ function doMenuTests($menu_name = 'tools') { $this->disableMenuLink($item1); $edit = array(); - // Note in the UI the 'mlid:x[hidden]' form element maps to enabled, or - // NOT hidden. - $edit['mlid:' . $item1['mlid'] . '[hidden]'] = TRUE; - $this->drupalPost('admin/structure/menu/manage/' . $item1['menu_name'], $edit, t('Save configuration')); + // Note in the UI the 'links[mlid:x][hidden]' form element maps to enabled, + // or NOT hidden. + $edit['links[mlid:' . $item1['mlid'] . '][hidden]'] = TRUE; + $this->drupalPost('admin/structure/menu/manage/' . $item1['menu_name'], $edit, t('Save')); // Verify in the database. $this->assertMenuLink($item1['mlid'], array('hidden' => 0)); diff --git a/core/modules/menu/menu.admin.inc b/core/modules/menu/menu.admin.inc index de76a31..11c86ac 100644 --- a/core/modules/menu/menu.admin.inc +++ b/core/modules/menu/menu.admin.inc @@ -7,6 +7,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Drupal\system\Plugin\Core\Entity\Menu; +use Drupal\Component\Utility\NestedArray; /** * Menu callback which shows an overview page of all the custom menus and their descriptions. @@ -47,20 +48,35 @@ function menu_menu_edit(Menu $menu) { } /** - * Form for editing an entire menu tree at once. + * Form constructor to edit an entire menu tree at once. * * Shows for one menu the menu links accessible to the current user and * relevant operations. + * + * This form constructor can be integrated as a section into another form. It + * relies on the following keys in $form_state: + * - menu: A loaded menu definition, as returned by menu_load(). + * - menu_overview_form_parents: An array containing the parent keys to this + * form. + * Forms integrating this section should call menu_overview_form_submit() from + * their form submit handler. */ -function menu_overview_form($form, &$form_state, $menu) { +function menu_overview_form($form, &$form_state) { global $menu_admin; + + // Ensure that menu_overview_form_submit() knows the parents of this form + // section. + $form['#tree'] = TRUE; + $form['#theme'] = 'menu_overview_form'; + $form_state += array('menu_overview_form_parents' => array()); + $form['#attached']['css'] = array(drupal_get_path('module', 'menu') . '/menu.admin.css'); $sql = " SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, m.description_callback, m.description_arguments, ml.* FROM {menu_links} ml LEFT JOIN {menu_router} m ON m.path = ml.router_path WHERE ml.menu_name = :menu ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC"; - $result = db_query($sql, array(':menu' => $menu->id()), array('fetch' => PDO::FETCH_ASSOC)); + $result = db_query($sql, array(':menu' => $form_state['menu']->id()), array('fetch' => PDO::FETCH_ASSOC)); $links = array(); foreach ($result as $item) { $links[] = $item; @@ -75,19 +91,8 @@ function menu_overview_form($form, &$form_state, $menu) { $menu_admin = FALSE; $form = array_merge($form, _menu_overview_tree_form($tree, $delta)); - $form['#menu'] = $menu; + $form['#empty_text'] = t('There are no menu links yet. Add link.', array('@link' => url('admin/structure/menu/manage/' . $form_state['menu']->id() .'/add'))); - if (element_children($form)) { - $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array( - '#type' => 'submit', - '#value' => t('Save configuration'), - '#button_type' => 'primary', - ); - } - else { - $form['#empty_text'] = t('There are no menu links yet. Add link.', array('@link' => url('admin/structure/menu/manage/'. $form['#menu']->id() .'/add'))); - } return $form; } @@ -183,15 +188,21 @@ function _menu_overview_tree_form($tree, $delta = 50) { * * @see menu_overview_form() */ -function menu_overview_form_submit($form, &$form_state) { +function menu_overview_form_submit($complete_form, &$form_state) { + $parents = $form_state['menu_overview_form_parents']; + $input = NestedArray::getValue($form_state['input'], $parents); + $form = &NestedArray::getValue($complete_form, $parents); + // When dealing with saving menu items, the order in which these items are // saved is critical. If a changed child item is saved before its parent, // the child item could be saved with an invalid path past its immediate // parent. To prevent this, save items in the form in the same order they // are sent by $_POST, ensuring parents are saved first, then their children. // See http://drupal.org/node/181126#comment-632270 - $order = array_flip(array_keys($form_state['input'])); // Get the $_POST order. - $form = array_intersect_key(array_merge($order, $form), $form); // Update our original form with the new order. + // Get the $_POST order. + $order = array_flip(array_keys($input)); + // Update our original form with the new order. + $form = array_intersect_key(array_merge($order, $form), $form); $updated_items = array(); $fields = array('weight', 'plid'); @@ -219,7 +230,6 @@ function menu_overview_form_submit($form, &$form_state) { $item['customized'] = 1; menu_link_save($item); } - drupal_set_message(t('Your configuration has been saved.')); } /** @@ -278,9 +288,20 @@ function theme_menu_overview_form($variables) { } /** - * Menu callback; Build the menu link editing form. + * Menu callback; add a new menu item. + */ +function menu_item_add($menu) { + drupal_set_title(t('Add menu item to %menu', array('%menu' => $menu->label())), PASS_THROUGH); + return drupal_get_form('menu_edit_item', 'add', NULL, $menu); +} + +/** + * Form builder; Build the menu link editing form. */ function menu_edit_item($form, &$form_state, $type, $item, $menu) { + // Make form simplified if in contextual administration. + $form['#simplified'] = TRUE; + if ($type == 'add' || empty($item)) { // This is an add form, initialize the menu link. $item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => $menu->id(), 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0); @@ -295,10 +316,10 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) { $breadcrumb[] = l($current_title, 'admin/structure/menu/manage/' . $item['menu_name']); drupal_set_breadcrumb($breadcrumb); } - $form['actions'] = array('#type' => 'actions'); + $form['actions'] = array('#type' => 'actions', '#weight' => 101); $form['link_title'] = array( '#type' => 'textfield', - '#title' => t('Menu link title'), + '#title' => t('Title'), '#default_value' => $item['link_title'], '#description' => t('The text to be used for this link in the menu.'), '#required' => TRUE, @@ -341,24 +362,28 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) { '#description' => l($item['link_title'], $item['href'], $item['options']), ); } + $form['description'] = array( '#type' => 'textarea', '#title' => t('Description'), '#default_value' => isset($item['options']['attributes']['title']) ? $item['options']['attributes']['title'] : '', '#rows' => 1, '#description' => t('Shown when hovering over the menu link.'), + '#weight' => 5, ); $form['enabled'] = array( '#type' => 'checkbox', '#title' => t('Enabled'), '#default_value' => !$item['hidden'], '#description' => t('Menu links that are not enabled will not be listed in any menu.'), + '#weight' => 6, ); $form['expanded'] = array( '#type' => 'checkbox', '#title' => t('Show as expanded'), '#default_value' => $item['expanded'], '#description' => t('If selected and this menu link has children, the menu will always appear expanded.'), + '#weight' => 7, ); // Generate a list of possible parents (not including this link or descendants). @@ -374,6 +399,7 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) { '#options' => $options, '#description' => t('The maximum depth for a link and all its children is fixed at !maxdepth. Some menu links may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => MENU_MAX_DEPTH)), '#attributes' => array('class' => array('menu-title-select')), + '#weight' => 8, ); // Get number of items in menu so the weight selector is sized appropriately. @@ -394,7 +420,9 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) { '#delta' => $delta, '#default_value' => $item['weight'], '#description' => t('Optional. In the menu, the heavier links will sink and the lighter links will be positioned nearer the top.'), + '#weight' => 8, ); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#button_type' => 'primary'); return $form; diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index 6acb232..3f7aeee 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -99,36 +99,28 @@ function menu_menu() { 'file' => 'menu.admin.inc', ); $items['admin/structure/menu/manage/%menu'] = array( - 'title' => 'Customize menu', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('menu_overview_form', 4), + 'title' => 'Edit menu', + 'page callback' => 'menu_menu_edit', + 'page arguments' => array(4), 'title callback' => 'entity_page_label', 'title arguments' => array(4), 'access arguments' => array('administer menu'), 'file' => 'menu.admin.inc', ); - $items['admin/structure/menu/manage/%menu/list'] = array( - 'title' => 'List links', - 'weight' => -10, - 'type' => MENU_DEFAULT_LOCAL_TASK, - 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, - ); $items['admin/structure/menu/manage/%menu/add'] = array( - 'title' => 'Add link', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('menu_edit_item', 'add', NULL, 4), + 'title' => 'Add menu item', + 'page callback' => 'menu_item_add', + 'page arguments' => array(4), 'access arguments' => array('administer menu'), 'type' => MENU_LOCAL_ACTION, 'file' => 'menu.admin.inc', + 'context' => MENU_CONTEXT_INLINE, ); $items['admin/structure/menu/manage/%menu/edit'] = array( 'title' => 'Edit menu', - 'page callback' => 'menu_menu_edit', - 'page arguments' => array(4), - 'access arguments' => array('administer menu'), - 'type' => MENU_LOCAL_TASK, + 'type' => MENU_DEFAULT_LOCAL_TASK, + 'weight' => -10, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, - 'file' => 'menu.admin.inc', ); $items['admin/structure/menu/manage/%menu/delete'] = array( 'title' => 'Delete menu', diff --git a/core/modules/overlay/overlay-child-rtl.css b/core/modules/overlay/overlay-child-rtl.css index eeff66c..061d8a9 100644 --- a/core/modules/overlay/overlay-child-rtl.css +++ b/core/modules/overlay/overlay-child-rtl.css @@ -12,10 +12,6 @@ html { float: right; left: auto; } -#overlay { - padding: 0.2em; - padding-left: 26px; -} #overlay-close-wrapper { left: 0; right: auto; diff --git a/core/modules/overlay/overlay-child.css b/core/modules/overlay/overlay-child.css index 48f217d..8d63677 100644 --- a/core/modules/overlay/overlay-child.css +++ b/core/modules/overlay/overlay-child.css @@ -21,38 +21,23 @@ min-height: 100px; min-width: 700px; position: relative; - padding: .2em; padding-bottom: 2em; - padding-right: 26px; /* LTR */ - width: 88%; -} -#overlay-titlebar { - padding: 0 20px; - position: relative; - white-space: nowrap; - z-index: 100; + width: 50%; } #overlay-content { - background: #fff; clear: both; color: #000; - padding: .5em 1em; + padding: .5em; position: relative; } -#overlay-title-wrapper { - overflow: hidden; -} -#overlay-title { - color: #fff; - float: left; /* LTR */ - font-size: 20px; - margin: 0; - padding: 0.3em 0; +#branding .breadcrumb, #branding .add-shortcut { + display: none; } -#overlay-title:active, -#overlay-title:focus { - outline: 0; + +body.overlay #branding h1.page-title { + display: block; + float: none; } .overlay #skip-link { @@ -62,76 +47,20 @@ color: #fff; /* This is white to contrast with the dark background behind it. */ } -#overlay-close-wrapper { - position: absolute; - right: 0; /* LTR */ -} -#overlay-close, -#overlay-close:hover { - background: transparent url(images/close.png) no-repeat; /* LTR */ - border-top-left-radius: 0; /* LTR */ - display: block; - height: 26px; - margin: 0; - padding: 0; - /* Replace with position:fixed to get a scrolling close button. */ - position: absolute; - width: 26px; +.form-actions { + text-align: right; /* LTR */ + width: 100%; } - -/** - * Tabs on the overlay. - */ -#overlay-tabs { - line-height: 26px; - margin: -28px 0 0 0; - position: absolute; - right: 20px; /* LTR */ - text-transform: uppercase; -} -#overlay-tabs li { - display: inline-block; - list-style: none; - margin: 0; - padding: 0; -} -#overlay-tabs li a, -#overlay-tabs li a:active, -#overlay-tabs li a:visited, -#overlay-tabs li a:hover { - background-color: #a6a7a2; - border-radius: 8px 8px 0 0; - color: #000; - display: inline-block; - font-size: 11px; - font-weight: bold; - margin: 0 1px; - outline: 0; - padding: 0 14px; - text-decoration: none; -} -#overlay-tabs li.active a, -#overlay-tabs li.active a.active, -#overlay-tabs li.active a:active, -#overlay-tabs li.active a:visited { - background-color: #fff; - margin-bottom: 0; - padding-bottom: 2px; +.form-actions .button { + display: none; } -#overlay-tabs li a:focus, -#overlay-tabs li a:hover { - color: #fff; -} -#overlay-tabs li.active a:focus, -#overlay-tabs li.active a:hover { - color: #000; +.form-actions .button.button-primary { + margin-right: 0em; /* LTR */ + display: inline; } - -/** - * Add to shortcuts link - */ -#overlay-titlebar .add-or-remove-shortcuts { - padding-top: 0.9em; +.form-actions .button.overlay-close { + display: inline; + float: left; } /** diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js index 80a8a2f..faefe91 100644 --- a/core/modules/overlay/overlay-child.js +++ b/core/modules/overlay/overlay-child.js @@ -163,20 +163,10 @@ Drupal.overlayChild.behaviors.tabs = function (context, settings) { }; /** - * If the shortcut add/delete button exists, move it to the overlay titlebar. + * Add cancel button to form actions. */ -Drupal.overlayChild.behaviors.shortcutAddLink = function (context, settings) { - // Remove any existing shortcut button markup from the titlebar. - $('#overlay-titlebar').find('.add-or-remove-shortcuts').remove(); - // If the shortcut add/delete button exists, move it to the titlebar. - var $addToShortcuts = $('.add-or-remove-shortcuts'); - if ($addToShortcuts.length) { - $addToShortcuts.insertAfter('#overlay-title'); - } - - $(document).bind('drupalOverlayBeforeLoad.drupal-overlay.drupal-overlay-child-loading', function () { - $('#overlay-titlebar').find('.add-or-remove-shortcuts').remove(); - }); +Drupal.overlayChild.behaviors.cancelAddButton = function (context, settings) { + $('.form-actions', context).prepend(''); }; // Workaround because of the way jQuery events works. diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js index caf9336..8d31cbc 100644 --- a/core/modules/overlay/overlay-parent.js +++ b/core/modules/overlay/overlay-parent.js @@ -554,6 +554,13 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) { var $target = $(event.target); + // Close the overlay when the link contains the overlay-close class. + if ($target.is('body') || $target.hasClass('overlay-close')) { + // Clearing the overlay URL fragment will close the overlay. + $.bbq.removeState('overlay'); + return; + } + // Only continue if clicked target (or one of its parents) is a link. if (!$target.is('a')) { $target = $target.closest('a'); @@ -567,10 +574,8 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) { return; } - // Close the overlay when the link contains the overlay-close class. - if ($target.hasClass('overlay-close')) { - // Clearing the overlay URL fragment will close the overlay. - $.bbq.removeState('overlay'); + // Only open links in the overlay if they are contextual links. + if (!$target.parent().parent().hasClass('contextual-links') && !$target.hasClass('button-action') && !$target.parent().hasClass('dropbutton-action')) { return; } diff --git a/core/modules/overlay/templates/overlay.tpl.php b/core/modules/overlay/templates/overlay.tpl.php index 38e6664..b17f5d5 100644 --- a/core/modules/overlay/templates/overlay.tpl.php +++ b/core/modules/overlay/templates/overlay.tpl.php @@ -23,15 +23,6 @@
> -
-
-

>

-
-
- -
-

-
>
diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php index dcf53b0..878f71a 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php @@ -112,6 +112,7 @@ function testBreadCrumbs() { 'admin/structure/menu' => t('Menus'), ); $this->assertBreadcrumb('admin/structure/menu/manage/tools', $trail); + $this->assertBreadcrumb('admin/structure/menu/manage/tools/edit', $trail); $mlid_node_add = db_query('SELECT mlid FROM {menu_links} WHERE link_path = :href AND module = :module', array( ':href' => 'node/add', @@ -121,7 +122,6 @@ function testBreadCrumbs() { 'admin/structure/menu/manage/tools' => t('Tools'), ); $this->assertBreadcrumb("admin/structure/menu/item/$mlid_node_add/edit", $trail); - $this->assertBreadcrumb('admin/structure/menu/manage/tools/edit', $trail); $this->assertBreadcrumb('admin/structure/menu/manage/tools/add', $trail); // Verify Node administration breadcrumbs. diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 336f84b..9eea656 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -254,6 +254,7 @@ function system_element_info() { $types['form'] = array( '#method' => 'post', '#action' => request_uri(), + '#process' => array('form_process_simplified_form'), '#theme_wrappers' => array('form'), ); $types['page'] = array( diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php index 7190521..6780cf7 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php @@ -74,13 +74,13 @@ function testDisabledAccountLink() { // Verify that the 'My account' link is enabled. $this->drupalGet('admin/structure/menu/manage/account'); - $this->assertFieldChecked('edit-mlid2-hidden', "The 'My account' link is enabled by default."); + $this->assertFieldChecked('edit-links-mlid2-hidden', "The 'My account' link is enabled by default."); // Disable the 'My account' link. $edit = array( - 'mlid:2[hidden]' => FALSE, + 'links[mlid:2][hidden]' => FALSE, ); - $this->drupalPost('admin/structure/menu/manage/account', $edit, t('Save configuration')); + $this->drupalPost('admin/structure/menu/manage/account', $edit, t('Save')); // Get the homepage. $this->drupalGet('');