summaryrefslogtreecommitdiff
path: root/modules/contact
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-13 20:40:09 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-13 20:40:09 +0000
commitdaedf71b7c1683a21df35e2f9d8660e89deeea62 (patch)
tree0dd29e1788ff6fa5c8415bf28dcc390429d15576 /modules/contact
parentbddec37f6df0fdb9171ec826f6961517163934da (diff)
downloadbrdo-daedf71b7c1683a21df35e2f9d8660e89deeea62.tar.gz
brdo-daedf71b7c1683a21df35e2f9d8660e89deeea62.tar.bz2
- Patch #391412 by JamesAn et al: move contact form, post, and user settings below Site configuration.
Diffstat (limited to 'modules/contact')
-rw-r--r--modules/contact/contact.module11
-rw-r--r--modules/contact/contact.test6
2 files changed, 8 insertions, 9 deletions
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index 10004fcb6..eb3056e3b 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -16,11 +16,11 @@ function contact_help($path, $arg) {
$output .= '<p>' . t("Personal contact forms allow users to be contacted via e-mail, while keeping recipient e-mail addresses private. Users may enable or disable their personal contact forms by editing their <em>My account</em> page. If enabled, a <em>Contact</em> tab leading to their personal contact form is available on their user profile. Site administrators have access to all personal contact forms (even if they have been disabled). The <em>Contact</em> tab is only visible when viewing another user's profile (users do not see their own <em>Contact</em> tab).") . '</p>';
$output .= '<p>' . t('The <a href="@contact">contact page</a> provides a simple form for visitors to leave comments, feedback, or other requests. Messages are routed by selecting a category from a list of administrator-defined options; each category has its own set of e-mail recipients. Common categories for a business site include, for example, "Website feedback" (messages are forwarded to web site administrators) and "Product information" (messages are forwarded to members of the sales department). The actual e-mail addresses defined within a category are not displayed. Only users in roles with the <em>access site-wide contact form</em> permission may access the <a href="@contact">contact page</a>.', array('@contact' => url('contact'))) . '</p>';
$output .= '<p>' . t('A link to your site\'s <a href="@contact">contact page</a> from the main <em>Navigation</em> menu is created, but is disabled by default. Create a similar link on another menu by adding a menu item pointing to the path "contact"', array('@contact' => url('contact'))) . '</p>';
- $output .= '<p>' . t('Customize the <a href="@contact">contact page</a> with additional information (like physical location, mailing address, and telephone number) using the <a href="@contact-settings">contact form settings page</a>. The <a href="@contact-settings">settings page</a> also provides configuration options for the maximum number of contact form submissions a user may perform per hour, and the default status of users\' personal contact forms.', array('@contact-settings' => url('admin/build/contact/settings'), '@contact' => url('contact'))) . '</p>';
+ $output .= '<p>' . t('Customize the <a href="@contact">contact page</a> with additional information (like physical location, mailing address, and telephone number) using the <a href="@contact-settings">contact form settings page</a>. The <a href="@contact-settings">settings page</a> also provides configuration options for the maximum number of contact form submissions a user may perform per hour, and the default status of users\' personal contact forms.', array('@contact-settings' => url('admin/settings/contact'), '@contact' => url('contact'))) . '</p>';
$output .= '<p>' . t('For more information, see the online handbook entry for <a href="@contact">Contact module</a>.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', array('absolute' => TRUE)))) . '</p>';
return $output;
case 'admin/build/contact':
- $output = '<p>' . t('This page lets you set up <a href="@form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="@settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('@settings' => url('admin/build/contact/settings'), '@form' => url('contact'))) . '</p>';
+ $output = '<p>' . t('This page lets you set up <a href="@form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="@settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('@settings' => url('admin/settings/contact'), '@form' => url('contact'))) . '</p>';
if (!module_exists('menu')) {
$menu_note = t('The menu item can be customized and configured only once the menu module has been <a href="@modules-page">enabled</a>.', array('@modules-page' => url('admin/settings/modules')));
}
@@ -85,13 +85,12 @@ function contact_menu() {
'access arguments' => array('administer site-wide contact form'),
'type' => MENU_CALLBACK,
);
- $items['admin/build/contact/settings'] = array(
- 'title' => 'Settings',
+ $items['admin/settings/contact'] = array(
+ 'title' => 'Contact form',
+ 'description' => 'Toggle personal contact forms and maximum contact form submissions.',
'page callback' => 'drupal_get_form',
'page arguments' => array('contact_admin_settings'),
'access arguments' => array('administer site-wide contact form'),
- 'type' => MENU_LOCAL_TASK,
- 'weight' => 2,
);
$items['contact'] = array(
'title' => 'Contact',
diff --git a/modules/contact/contact.test b/modules/contact/contact.test
index c31b709ce..0eae9fdb7 100644
--- a/modules/contact/contact.test
+++ b/modules/contact/contact.test
@@ -29,7 +29,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase {
$edit = array();
$edit['contact_hourly_threshold'] = 3;
$edit['contact_default_status'] = TRUE;
- $this->drupalPost('admin/build/contact/settings', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/contact', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'), t('Setting successfully saved.'));
// Delete old categories to ensure that new categories are used.
@@ -322,7 +322,7 @@ class ContactPersonalTestCase extends DrupalWebTestCase {
$edit = array();
$edit['contact_default_status'] = TRUE;
$edit['contact_hourly_threshold'] = $flood_control;
- $this->drupalPost('admin/build/contact/settings', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/contact', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'), t('Setting successfully saved.'));
// Reload variables.
@@ -366,7 +366,7 @@ class ContactPersonalTestCase extends DrupalWebTestCase {
// Disable the personal contact form.
$edit = array();
$edit['contact_default_status'] = FALSE;
- $this->drupalPost('admin/build/contact/settings', $edit, t('Save configuration'));
+ $this->drupalPost('admin/settings/contact', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'), t('Setting successfully saved.'));
// Reload variables.