summaryrefslogtreecommitdiff
path: root/modules/menu
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-09-24 21:36:22 +0000
committerDries Buytaert <dries@buytaert.net>2010-09-24 21:36:22 +0000
commite22b2153a2a83b1d1eca60c62703514cd09a55aa (patch)
tree3a15f99951e57c3409b5dddb2729bb4ff368da0a /modules/menu
parent01f5742f19d0731aa28da41a220db0386eb4ce32 (diff)
downloadbrdo-e22b2153a2a83b1d1eca60c62703514cd09a55aa.tar.gz
brdo-e22b2153a2a83b1d1eca60c62703514cd09a55aa.tar.bz2
- Patch #140783 by sun: a select list without #default_value() always passes form validation.
Diffstat (limited to 'modules/menu')
-rw-r--r--modules/menu/menu.admin.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 2eac43cb3..181f8f5d3 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -680,22 +680,24 @@ function menu_configure() {
$menu_options = menu_get_menus();
$main = variable_get('menu_main_links_source', 'main-menu');
- $main_options = array_merge($menu_options, array('' => t('No Main links')));
$form['menu_main_links_source'] = array(
'#type' => 'select',
'#title' => t('Source for the Main links'),
+ '#required' => FALSE,
'#default_value' => variable_get('menu_main_links_source', 'main-menu'),
- '#options' => $main_options,
+ '#empty_option' => t('No Main links'),
+ '#options' => $menu_options,
'#tree' => FALSE,
'#description' => t('Select what should be displayed as the Main links (typically at the top of the page).'),
);
- $secondary_options = array_merge($menu_options, array('' => t('No Secondary links')));
$form['menu_secondary_links_source'] = array(
'#type' => 'select',
'#title' => t('Source for the Secondary links'),
+ '#required' => FALSE,
'#default_value' => variable_get('menu_secondary_links_source', 'user-menu'),
- '#options' => $secondary_options,
+ '#empty_option' => t('No Secondary links'),
+ '#options' => $menu_options,
'#tree' => FALSE,
'#description' => t("Select the source for the Secondary links. An advanced option allows you to use the same source for both Main links (currently %main) and Secondary links: if your source menu has two levels of hierarchy, the top level menu links will appear in the Main links, and the children of the active link will appear in the Secondary links." , array('%main' => $main_options[$main])),
);