diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 0ad6093..b175ff4 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -12,28 +12,33 @@ * Implements hook_help(). */ function contact_help($route_name, RouteMatchInterface $route_match) { + $menu_page = \Drupal::moduleHandler()->moduleExists('menu_ui') ? \Drupal::url('menu_ui.overview_page') : '#'; + $block_page = \Drupal::moduleHandler()->moduleExists('block') ? \Drupal::url('block.admin_display') : '#'; + $contact_page = \Drupal::url('contact.form_list'); + switch ($route_name) { case 'help.page.contact': $output = ''; $output .= '

' . t('About') . '

'; - $output .= '

' . t('The Contact module allows visitors to contact site administrators and other users. Users specify a subject, write their message, and can have a copy of their message sent to their own email address. For more information, see the online handbook entry for Contact module.', array('@contact' => 'http://drupal.org/documentation/modules/contact')) . '

'; + $output .= '

' . t('The Contact module allows visitors to contact registered users on your site, using the personal contact form, and also allows you to set up site-wide contact forms. For more information, see the online documentation for the Contact module.', array('!contact' => 'https://www.drupal.org/documentation/modules/contact')) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; - $output .= '
' . t('User contact forms') . '
'; - $output .= '
' . t('Site users can be contacted with a user contact form that keeps their email address private. Users may enable or disable their personal contact forms by editing their My account page. If enabled, a Contact tab leads to a personal contact form displayed on their user profile. Site administrators are still able to use the contact form, even if has been disabled. The Contact tab is not shown when you view your own profile.') . '
'; - $output .= '
' . t('Site-wide contact forms') . '
'; - $output .= '
' . t('The Contact page provides a simple form for users with the Use the site-wide contact form permission to send comments, feedback, or other requests. You can create forms for directing the contact messages to a set of defined recipients. Common forms for a business site, for example, might include "Website feedback" (messages are forwarded to website administrators) and "Product information" (messages are forwarded to members of the sales department). Email addresses defined within a form are not displayed publicly.', array('@contact' => \Drupal::url('contact.site_page'))) . '

'; - $output .= '
' . t('Navigation') . '
'; - $output .= '
' . t('When the site-wide contact form is enabled, a link in the Footer menu is created, which you can modify on the Menus administration page.', array('@menu' => \Drupal::url('menu_ui.overview_page'))) . '
'; - $output .= '
' . t('Customization') . '
'; - $output .= '
' . t('If you would like additional text to appear on the site-wide or personal contact page, use a block. You can create and edit blocks on the Blocks administration page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; + $output .= '
' . t('Using the personal contact form') . '
'; + $output .= '
' . t("Site visitors can email registered users on your site by using the personal contact form, without knowing or learning the email address of the recipient. When a site visitor is viewing a user profile, the viewer will see a Contact tab or link, which leads to the personal contact form. The personal contact link is not shown when you are viewing your own profile, and users must have both View user information (to see user profiles) and Use users' personal contact forms permission to see the link. The user whose profile is being viewed must also have their personal contact form enabled (this is a user account setting); viewers with Administer users permission can bypass this setting.") . '
'; + $output .= '
' . t('Configuring contact forms') . '
'; + $output .= '
' . t('On the Contact forms page, you can configure the fields and display of the personal contact form, and you can set up one or more site-wide contact forms. Each site-wide contact form has a machine name, a label, and one or more defined recipients; when a site visitor submits the form, the field values are sent to those recipients.', array('!contact_admin' => $contact_page)) . '
'; + $output .= '
' . t('Linking to contact forms') . '
'; + $output .= '
' . t('One site-wide contact form can be designated as the default contact form. If you choose to designate a default form, the Contact menu link in the Footer menu will link to it. You can modify this link from the Menus page if you have the Menu UI module installed. You can also create links to other contact forms; the URL for each form you have set up has format contact/machine_name_of_form.', array('!menu-settings' => $menu_page)) . '

'; + $output .= '
' . t('Adding text to contact forms') . '
'; + $output .= '
' . t('From the Contact forms page, you can configure the fields to be shown on contact forms. If you would also like plain text (other than field labels) to appear on a contact form, use a block. You can create and edit blocks on the Block layout page, if the Block module is installed.', array('!blocks' => $block_page, '!contact_admin' => $contact_page)) . '
'; $output .= '
'; return $output; case 'contact.form_list': - $output = '

' . t('Add one or more forms on this page to set up your site-wide contact form.', array('@form' => \Drupal::url('contact.site_page'))) . '

'; - $output .= '

' . t('A Contact menu item is added to the Footer menu, which you can modify on the Menus administration page.', array('@menu-settings' => \Drupal::url('menu_ui.overview_page'))) . '

'; - $output .= '

' . t('If you would like additional text to appear on the site-wide contact page, use a block. You can create and edit blocks on the Blocks administration page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '

'; + $output = ''; + $output .= '

' . t('The Personal contact form is the form for site visitors to contact registered users; the name and recipients of this form cannot be edited. Other forms listed here are your configured site-wide contact forms, which site visitors can use to send mail to a centralized email address or addresses. You can edit the name and recipients of site-wide forms by choosing the Edit operation. You can also configure the fields and display of both personal and site-wide forms.') . '

'; + $output .= '

' . t('If you have configured a default site-wide contact form, a Contact menu link in the Footer menu will link to it. You can modify this link from the Menus page if you have the Menu UI module installed. You can also create links to other contact forms; the URL has format contact/machine_name_of_form.', array('!menu-settings' => $menu_page)) . '

'; + $output .= '

' . t('If you would like additional text to appear on a site-wide contact page, beyond field labels, use a block. You can create and edit blocks on the Block layout page, if you have the Block module installed.', array('!blocks' => $block_page)) . '

'; return $output; } }