summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries2013-02-18 21:21:42 (GMT)
committerDries2013-02-18 21:21:42 (GMT)
commitdc3466b5144ee364e63b4a4ca00dbe2867cc2973 (patch)
treec23f1e0d32a069cf56154fefc6c823daa4c24ecd
parent41d4d664bf8090a8232017b94bf955d1128a1e03 (diff)
Issue #967566 by Letharion, mariusz.slonina, indytechcook, adnasa, joestewart, oriol_e9g, Fabianx, tim.plunkett, valthebald, tsvenson, rbayliss, sun, xjm | DocuAnt: Several important Core User settings need to implement hook_field_extra_fields().
-rw-r--r--core/modules/contact/contact.module6
-rw-r--r--core/modules/overlay/overlay.module12
-rw-r--r--core/modules/user/user.module51
3 files changed, 48 insertions, 21 deletions
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module
index a45e97d..4957052 100644
--- a/core/modules/contact/contact.module
+++ b/core/modules/contact/contact.module
@@ -236,6 +236,12 @@ function contact_field_extra_fields() {
'weight' => 0,
);
}
+
+ $fields['user']['user']['form']['contact'] = array(
+ 'label' => t('Contact settings'),
+ 'description' => t('Contact module form element.'),
+ 'weight' => 5,
+ );
return $fields;
}
diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module
index 1893a15..cc29255 100644
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -82,6 +82,18 @@ function overlay_theme() {
}
/**
+ * Implements hook_field_extra_fields().
+ */
+function overlay_field_extra_fields() {
+ $fields['user']['user']['form']['overlay_control'] = array(
+ 'label' => t('Administrative overlay'),
+ 'description' => t('Overlay module form element.'),
+ 'weight' => 4,
+ );
+ return $fields;
+}
+
+/**
* Implements hook_form_FORM_ID_alter().
*/
function overlay_form_user_profile_form_alter(&$form, &$form_state) {
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 8901534..f2747c7 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -235,29 +235,38 @@ function user_field_info_alter(&$info) {
* Implements hook_field_extra_fields().
*/
function user_field_extra_fields() {
- $return['user']['user'] = array(
- 'form' => array(
- 'account' => array(
- 'label' => t('User name and password'),
- 'description' => t('User module account form elements.'),
- 'weight' => -10,
- ),
- 'timezone' => array(
- 'label' => t('Timezone'),
- 'description' => t('User module timezone form element.'),
- 'weight' => 6,
- ),
- ),
- 'display' => array(
- 'member_for' => array(
- 'label' => t('Member for'),
- 'description' => t('User module \'member for\' view element.'),
- 'weight' => 5,
- ),
- ),
+ $fields['user']['user']['form']['account'] = array(
+ 'label' => t('User name and password'),
+ 'description' => t('User module account form elements.'),
+ 'weight' => -10,
+ );
+ if (config('user.settings')->get('signatures')) {
+ $fields['user']['user']['form']['signature_settings'] = array(
+ 'label' => t('Signature settings'),
+ 'description' => t('User module form element.'),
+ 'weight' => 1,
+ );
+ }
+ $fields['user']['user']['form']['language'] = array(
+ 'label' => t('Language settings'),
+ 'description' => t('User module form element.'),
+ 'weight' => 0,
+ );
+ if (config('system.timezone')->get('user.configurable')) {
+ $fields['user']['user']['form']['timezone'] = array(
+ 'label' => t('Timezone'),
+ 'description' => t('System module form element.'),
+ 'weight' => 6,
+ );
+ }
+
+ $fields['user']['user']['display']['member_for'] = array(
+ 'label' => t('Member for'),
+ 'description' => t('User module \'member for\' view element.'),
+ 'weight' => 5,
);
- return $return;
+ return $fields;
}
/**