Skip to content
Snippets Groups Projects
Commit 84a5ff40 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #44544 by Richard: made the help text slightly more accurate.

parent 1a866d14
No related branches found
No related tags found
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
...@@ -388,15 +388,15 @@ function menu_edit_item($mid = 0) { ...@@ -388,15 +388,15 @@ function menu_edit_item($mid = 0) {
function menu_edit_item_form($edit) { function menu_edit_item_form($edit) {
$menu = menu_get_menu(); $menu = menu_get_menu();
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $edit['title'], '#description' => t('The name of the menu.'), '#required' => TRUE);
if ($edit['pid'] == 0) { if ($edit['pid'] == 0) {
// Display a limited set of fields for menus (not items). // Display a limited set of fields for menus (not items).
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $edit['title'], '#description' => t('The name of the menu.'), '#required' => TRUE);
$form['path'] = array('#type' => 'hidden', '#value' => ''); $form['path'] = array('#type' => 'hidden', '#value' => '');
$form['pid'] = array('#type' => 'hidden', '#value' => 0); $form['pid'] = array('#type' => 'hidden', '#value' => 0);
$form['weight'] = array('#type' => 'hidden', '#value' => 0); $form['weight'] = array('#type' => 'hidden', '#value' => 0);
} }
else { else {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $edit['title'], '#description' => t('The name of the menu item.'), '#required' => TRUE);
$form['description'] = array('#type' => 'textfield', '#title' => t('Description'), '#default_value' => $edit['description'], '#description' => t('The description displayed when hovering over a menu item.')); $form['description'] = array('#type' => 'textfield', '#title' => t('Description'), '#default_value' => $edit['description'], '#description' => t('The description displayed when hovering over a menu item.'));
$path_description = t('The Drupal path this menu item links to. Enter %front to link to the front page.', array('%front' => theme('placeholder', '<front>'))); $path_description = t('The Drupal path this menu item links to. Enter %front to link to the front page.', array('%front' => theme('placeholder', '<front>')));
......
...@@ -388,15 +388,15 @@ function menu_edit_item($mid = 0) { ...@@ -388,15 +388,15 @@ function menu_edit_item($mid = 0) {
function menu_edit_item_form($edit) { function menu_edit_item_form($edit) {
$menu = menu_get_menu(); $menu = menu_get_menu();
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $edit['title'], '#description' => t('The name of the menu.'), '#required' => TRUE);
if ($edit['pid'] == 0) { if ($edit['pid'] == 0) {
// Display a limited set of fields for menus (not items). // Display a limited set of fields for menus (not items).
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $edit['title'], '#description' => t('The name of the menu.'), '#required' => TRUE);
$form['path'] = array('#type' => 'hidden', '#value' => ''); $form['path'] = array('#type' => 'hidden', '#value' => '');
$form['pid'] = array('#type' => 'hidden', '#value' => 0); $form['pid'] = array('#type' => 'hidden', '#value' => 0);
$form['weight'] = array('#type' => 'hidden', '#value' => 0); $form['weight'] = array('#type' => 'hidden', '#value' => 0);
} }
else { else {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $edit['title'], '#description' => t('The name of the menu item.'), '#required' => TRUE);
$form['description'] = array('#type' => 'textfield', '#title' => t('Description'), '#default_value' => $edit['description'], '#description' => t('The description displayed when hovering over a menu item.')); $form['description'] = array('#type' => 'textfield', '#title' => t('Description'), '#default_value' => $edit['description'], '#description' => t('The description displayed when hovering over a menu item.'));
$path_description = t('The Drupal path this menu item links to. Enter %front to link to the front page.', array('%front' => theme('placeholder', '<front>'))); $path_description = t('The Drupal path this menu item links to. Enter %front to link to the front page.', array('%front' => theme('placeholder', '<front>')));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment