2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
@@ -278,7 +278,7 @@ function menu_edit_item(&$form_state, $type, $item, $menu) {
'#type'=>'textfield',
'#title'=>t('Path'),
'#default_value'=>$path,
'#description'=>t('The path this menu item links to. 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')),
'#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(
...
...
@@ -301,7 +301,7 @@ function menu_edit_item(&$form_state, $type, $item, $menu) {
@@ -479,14 +479,14 @@ function menu_delete_menu_confirm(&$form_state, $menu) {
$caption='';
$num_links=db_result(db_query("SELECT COUNT(*) FROM {menu_links} WHERE menu_name = '%s'",$menu['menu_name']));
if($num_links){
$caption.='<p>'.format_plural($num_links,'<strong>Warning:</strong> There is currently 1 menu item in %title. It will be deleted (system-defined items will be reset).','<strong>Warning:</strong> There are currently @count menu items in %title. They will be deleted (system-defined items will be reset).',array('%title'=>$menu['title'])).'</p>';
$caption.='<p>'.format_plural($num_links,'<strong>Warning:</strong> There is currently 1 menu link in %title. It will be deleted (system-defined items will be reset).','<strong>Warning:</strong> There are currently @count menu links in %title. They will be deleted (system-defined links will be reset).',array('%title'=>$menu['title'])).'</p>';
}
$caption.='<p>'.t('This action cannot be undone.').'</p>';
returnconfirm_form($form,t('Are you sure you want to delete the custom menu %title?',array('%title'=>$menu['title'])),'admin/build/menu-customize/'.$menu['menu_name'],$caption,t('Delete'));
returnconfirm_form($form,t('Are you sure you want to delete the custom menu item %item?',array('%item'=>$item['link_title'])),'admin/build/menu-customize/'.$item['menu_name']);
returnconfirm_form($form,t('Are you sure you want to delete the custom menu link %item?',array('%item'=>$item['link_title'])),'admin/build/menu-customize/'.$item['menu_name']);
}
/**
...
...
@@ -597,17 +597,17 @@ function menu_item_delete_form_submit($form, &$form_state) {
$item=$form['#item'];
menu_link_delete($item['mlid']);
$t_args=array('%title'=>$item['link_title']);
drupal_set_message(t('The menu item %title has been deleted.',$t_args));
watchdog('menu','Deleted menu item %title.',$t_args,WATCHDOG_NOTICE);
drupal_set_message(t('The menu link %title has been deleted.',$t_args));
watchdog('menu','Deleted menu link %title.',$t_args,WATCHDOG_NOTICE);
returnconfirm_form($form,t('Are you sure you want to reset the item %item to its default values?',array('%item'=>$item['link_title'])),'admin/build/menu-customize/'.$item['menu_name'],t('Any customizations will be lost. This action cannot be undone.'),t('Reset'));
returnconfirm_form($form,t('Are you sure you want to reset the link %item to its default values?',array('%item'=>$item['link_title'])),'admin/build/menu-customize/'.$item['menu_name'],t('Any customizations will be lost. This action cannot be undone.'),t('Reset'));
}
/**
...
...
@@ -616,7 +616,7 @@ function menu_reset_item_confirm(&$form_state, $item) {