summaryrefslogtreecommitdiff
path: root/modules/menu
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-09-29 01:57:30 +0000
committerDries Buytaert <dries@buytaert.net>2010-09-29 01:57:30 +0000
commitd6ebcd7beeea841a66ca35a956113aaee983ae42 (patch)
tree6bea17ff53e2bf674b7edb518f424260bb765de3 /modules/menu
parent581ad51dcb9c30111cf1d82f76d1404a10372d28 (diff)
downloadbrdo-d6ebcd7beeea841a66ca35a956113aaee983ae42.tar.gz
brdo-d6ebcd7beeea841a66ca35a956113aaee983ae42.tar.bz2
- Patch #797380 by asimmonds: when editing menu - Enter triggers Delete instead of Save.
Diffstat (limited to 'modules/menu')
-rw-r--r--modules/menu/menu.admin.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 181f8f5d3..e18162c97 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -259,6 +259,7 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) {
// This is an add form, initialize the menu link.
$item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => $menu['menu_name'], 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0);
}
+ $form['actions'] = array('#type' => 'actions');
$form['link_title'] = array(
'#type' => 'textfield',
'#title' => t('Menu link title'),
@@ -288,7 +289,7 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) {
'#description' => t('The path for this menu link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page.', array('%front' => '<front>', '%add-node' => 'node/add', '%drupal' => 'http://drupal.org')),
'#required' => TRUE,
);
- $form['delete'] = array(
+ $form['actions']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#access' => $item['mlid'],
@@ -344,7 +345,6 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) {
'#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.'),
);
- $form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save'));
return $form;