? .DS_Store
? contact_form_perm._00.patch
? contact_form_perm._01.patch
? contact_function_names_00.patch
? contact_submit_button_00.patch
? contact_submit_button_01.patch
? test.patch
? test2.patch
? user_settings_00.patch
? user_settings_01.patch
? modules/.DS_Store
? sites/.DS_Store
? sites/default/files
? sites/default/settings.php
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.45
diff -u -p -r1.45 user.admin.inc
--- modules/user/user.admin.inc	30 Apr 2009 16:10:10 -0000	1.45
+++ modules/user/user.admin.inc	9 May 2009 19:11:13 -0000
@@ -245,301 +245,308 @@ function user_admin_account_validate($fo
  */
 function user_admin_settings() {
   // User registration settings.
-  $form['registration'] = array('#type' => 'fieldset', '#title' => t('User registration settings'));
-  $form['registration']['user_register'] = array('#type' => 'radios', '#title' => t('Public registrations'), '#default_value' => variable_get('user_register', 1), '#options' => array(t('Only site administrators can create new user accounts.'), t('Visitors can create accounts and no administrator approval is required.'), t('Visitors can create accounts but administrator approval is required.')));
-  $form['registration']['user_email_verification'] = array('#type' => 'checkbox', '#title' => t('Require e-mail verification when a visitor creates an account'), '#default_value' => variable_get('user_email_verification', TRUE), '#description' => t('If this box is checked, new users will be required to validate their e-mail address prior to logging into the site, and will be assigned a system-generated password. With it unchecked, users will be logged in immediately upon registering, and may select their own passwords during registration.'));
-
-  // Account cancellation settings.
-  module_load_include('inc', 'user', 'user.pages');
-  $form['cancel'] = array(
+  $form['registration_cancellation'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Account cancellation settings'),
+    '#title' => t('Registration and cancellation')
+  );
+  $form['registration_cancellation']['user_register'] = array(
+    '#type' => 'radios',
+    '#title' => t('Who can register accounts?'),
+    '#default_value' => variable_get('user_register', 1),
+    '#options' => array(
+      t('Administrators only.'),
+      t('Visitors.'),
+      t('Visitors, but administrator approval is required.'),
+    )
   );
-  $form['cancel']['user_cancel_method'] = array(
+  $form['registration_cancellation']['user_email_verification'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Require e-mail verification when a visitor creates an account'),
+    '#default_value' => variable_get('user_email_verification', TRUE),
+    '#description' => t('New users will be required to validate their e-mail address prior to logging into the site, and will be assigned a system-generated password. If disabled, users will be logged in immediately upon registering, and may select their own passwords during registration.')
+  );
+  module_load_include('inc', 'user', 'user.pages');
+  $form['registration_cancellation']['user_cancel_method'] = array(
     '#type' => 'item',
     '#title' => t('When cancelling a user account'),
     '#description' => t('This default applies to all users who want to cancel their accounts. Users with the %select-cancel-method or %administer-users <a href="@permissions-url">permissions</a> can override this default method.', array('%select-cancel-method' => t('Select method for cancelling account'), '%administer-users' => t('Administer users'), '@permissions-url' => url('admin/user/permissions'))),
   );
-  $form['cancel']['user_cancel_method'] += user_cancel_methods();
-  foreach (element_children($form['cancel']['user_cancel_method']) as $element) {
+  $form['registration_cancellation']['user_cancel_method'] += user_cancel_methods();
+  foreach (element_children($form['registration_cancellation']['user_cancel_method']) as $element) {
     // Remove all account cancellation methods that have #access defined, as
     // those cannot be configured as default method.
-    if (isset($form['cancel']['user_cancel_method'][$element]['#access'])) {
-      $form['cancel']['user_cancel_method'][$element]['#access'] = FALSE;
+    if (isset($form['registration_cancellation']['user_cancel_method'][$element]['#access'])) {
+      $form['registration_cancellation']['user_cancel_method'][$element]['#access'] = FALSE;
     }
     // Remove the description (only displayed on the confirmation form).
     else {
-      unset($form['cancel']['user_cancel_method'][$element]['#description']);
+      unset($form['registration_cancellation']['user_cancel_method'][$element]['#description']);
     }
   }
 
-  // User e-mail settings.
-  $form['email'] = array(
+  // Account settings.
+  $form['personalisation'] = array(
     '#type' => 'fieldset',
-    '#title' => t('User e-mail settings'),
-    '#description' => t('Drupal sends emails whenever new users register on your site, and optionally, may also notify users after other account actions. Using a simple set of content templates, notification e-mails can be customized to fit the specific needs of your site.'),
+    '#title' => t('Personalisation'),
+  );
+  $form['personalisation']['user_signatures'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable signatures'),
+    '#default_value' => variable_get('user_signatures', 0),
+  );
+  // If picture support is enabled, check whether the picture directory exists:
+  if (variable_get('user_pictures', 0)) {
+    $picture_path = file_create_path(variable_get('user_picture_path', 'pictures'));
+    file_check_directory($picture_path, FILE_CREATE_DIRECTORY, 'user_picture_path');
+  }
+  $picture_support = variable_get('user_pictures', 0);
+  $form['personalisation']['user_pictures'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable user pictures'),
+    '#default_value' => $picture_support,
+  );
+  drupal_add_js(drupal_get_path('module', 'user') . '/user.js');
+  // If JS is enabled, and the checkbox defaults to off, hide all the settings
+  // on page load via CSS using the js-hide class so there's no flicker.
+  $css_class = 'user-admin-picture-settings';
+  if (!$picture_support) {
+    $css_class .= ' js-hide';
+  }
+  $form['personalisation']['pictures'] = array(
+    '#prefix' => '<div class="' . $css_class . '">',
+    '#suffix' => '</div>',
+  );
+  $form['personalisation']['pictures']['user_picture_path'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Picture image path'),
+    '#default_value' => variable_get('user_picture_path', 'pictures'),
+    '#size' => 30,
+    '#maxlength' => 255,
+    '#description' => t('Subdirectory in the directory %dir where pictures will be stored.', array('%dir' => file_directory_path() . '/')),
+  );
+  $form['personalisation']['pictures']['user_picture_default'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Default picture'),
+    '#default_value' => variable_get('user_picture_default', ''),
+    '#size' => 30,
+    '#maxlength' => 255,
+    '#description' => t('URL of picture to display for users with no custom picture selected. Leave blank for none.'),
+  );
+  $form['personalisation']['pictures']['user_picture_dimensions'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Picture maximum dimensions'),
+    '#default_value' => variable_get('user_picture_dimensions', '85x85'),
+    '#size' => 15,
+    '#maxlength' => 10,
+    '#description' => t('Maximum dimensions for pictures, in pixels.'),
+  );
+  $form['personalisation']['pictures']['user_picture_file_size'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Picture maximum file size'),
+    '#default_value' => variable_get('user_picture_file_size', '30'),
+    '#size' => 15,
+    '#maxlength' => 10,
+    '#description' => t('Maximum file size for pictures, in kB.'),
+  );
+  $form['personalisation']['pictures']['user_picture_guidelines'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Picture guidelines'),
+    '#default_value' => variable_get('user_picture_guidelines', ''),
+    '#description' => t("This text is displayed at the picture upload form in addition to the default guidelines. It's useful for helping or instructing your users."),
+  );
+
+  $form['email'] = array(
+    '#type' => 'vertical_tabs',
   );
+
+
   // These email tokens are shared for all settings, so just define
   // the list once to help ensure they stay in sync.
   $email_token_help = t('Available variables are:') . ' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url, !cancel_url.';
 
-  $form['email']['admin_created'] = array(
+  $form['email_admin_created'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Welcome, new user created by administrator'),
+    '#title' => t('Welcome (new user created by administrator)'),
     '#collapsible' => TRUE,
     '#collapsed' => (variable_get('user_register', 1) != 0),
     '#description' => t('Customize welcome e-mail messages sent to new member accounts created by an administrator.') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['admin_created']['user_mail_register_admin_created_subject'] = array(
+  $form['email_admin_created']['user_mail_register_admin_created_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('register_admin_created_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['admin_created']['user_mail_register_admin_created_body'] = array(
+  $form['email_admin_created']['user_mail_register_admin_created_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('register_admin_created_body'),
     '#rows' => 15,
   );
 
-  $form['email']['no_approval_required'] = array(
+  $form['email_no_approval_required'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Welcome, no approval required'),
+    '#title' => t('Welcome (no approval required)'),
     '#collapsible' => TRUE,
     '#collapsed' => (variable_get('user_register', 1) != 1),
-    '#description' => t('Customize welcome e-mail messages sent to new members upon registering, when no administrator approval is required.') . ' ' . $email_token_help
+    '#description' => t('Customize welcome e-mail messages sent to new members upon registering, when no administrator approval is required.') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['no_approval_required']['user_mail_register_no_approval_required_subject'] = array(
+  $form['email_no_approval_required']['user_mail_register_no_approval_required_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('register_no_approval_required_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['no_approval_required']['user_mail_register_no_approval_required_body'] = array(
+  $form['email_no_approval_required']['user_mail_register_no_approval_required_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('register_no_approval_required_body'),
     '#rows' => 15,
   );
 
-  $form['email']['pending_approval'] = array(
+  $form['email_pending_approval'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Welcome, awaiting administrator approval'),
+    '#title' => t('Welcome (awaiting administrator approval)'),
     '#collapsible' => TRUE,
     '#collapsed' => (variable_get('user_register', 1) != 2),
     '#description' => t('Customize welcome e-mail messages sent to new members upon registering, when administrative approval is required.') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['pending_approval']['user_mail_register_pending_approval_subject'] = array(
+  $form['email_pending_approval']['user_mail_register_pending_approval_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('register_pending_approval_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['pending_approval']['user_mail_register_pending_approval_body'] = array(
+  $form['email_pending_approval']['user_mail_register_pending_approval_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('register_pending_approval_body'),
     '#rows' => 8,
   );
 
-  $form['email']['password_reset'] = array(
+  $form['email_password_reset'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Password recovery email'),
+    '#title' => t('Password recovery'),
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
     '#description' => t('Customize e-mail messages sent to users who request a new password.') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['password_reset']['user_mail_password_reset_subject'] = array(
+  $form['email_password_reset']['user_mail_password_reset_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('password_reset_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['password_reset']['user_mail_password_reset_body'] = array(
+  $form['email_password_reset']['user_mail_password_reset_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('password_reset_body'),
     '#rows' => 12,
   );
 
-  $form['email']['activated'] = array(
+  $form['email_activated'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Account activation email'),
+    '#title' => t('Account activation'),
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
     '#description' => t('Enable and customize e-mail messages sent to users upon account activation (when an administrator activates an account of a user who has already registered, on a site where administrative approval is required).') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['activated']['user_mail_status_activated_notify'] = array(
+  $form['email_activated']['user_mail_status_activated_notify'] = array(
     '#type' => 'checkbox',
     '#title' => t('Notify user when account is activated.'),
     '#default_value' => variable_get('user_mail_status_activated_notify', TRUE),
   );
-  $form['email']['activated']['user_mail_status_activated_subject'] = array(
+  $form['email_activated']['user_mail_status_activated_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('status_activated_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['activated']['user_mail_status_activated_body'] = array(
+  $form['email_activated']['user_mail_status_activated_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('status_activated_body'),
     '#rows' => 15,
   );
 
-  $form['email']['blocked'] = array(
+  $form['email_blocked'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Account blocked email'),
+    '#title' => t('Account blocked'),
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
     '#description' => t('Enable and customize e-mail messages sent to users when their accounts are blocked.') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['blocked']['user_mail_status_blocked_notify'] = array(
+  $form['email_blocked']['user_mail_status_blocked_notify'] = array(
     '#type' => 'checkbox',
     '#title' => t('Notify user when account is blocked.'),
     '#default_value' => variable_get('user_mail_status_blocked_notify', FALSE),
   );
-  $form['email']['blocked']['user_mail_status_blocked_subject'] = array(
+  $form['email_blocked']['user_mail_status_blocked_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('status_blocked_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['blocked']['user_mail_status_blocked_body'] = array(
+  $form['email_blocked']['user_mail_status_blocked_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('status_blocked_body'),
     '#rows' => 3,
   );
 
-  $form['email']['cancel_confirm'] = array(
+  $form['email_cancel_confirm'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Account cancellation confirmation email'),
+    '#title' => t('Account cancellation confirmation'),
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
     '#description' => t('Customize e-mail messages sent to users when they attempt to cancel their accounts.') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['cancel_confirm']['user_mail_cancel_confirm_subject'] = array(
+  $form['email_cancel_confirm']['user_mail_cancel_confirm_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('cancel_confirm_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['cancel_confirm']['user_mail_cancel_confirm_body'] = array(
+  $form['email_cancel_confirm']['user_mail_cancel_confirm_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('cancel_confirm_body'),
     '#rows' => 3,
   );
 
-  $form['email']['canceled'] = array(
+  $form['email_canceled'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Account canceled email'),
+    '#title' => t('Account canceled'),
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
     '#description' => t('Enable and customize e-mail messages sent to users when their accounts are canceled.') . ' ' . $email_token_help,
+    '#group' => 'email',
   );
-  $form['email']['canceled']['user_mail_status_canceled_notify'] = array(
+  $form['email_canceled']['user_mail_status_canceled_notify'] = array(
     '#type' => 'checkbox',
     '#title' => t('Notify user when account is canceled.'),
     '#default_value' => variable_get('user_mail_status_canceled_notify', FALSE),
   );
-  $form['email']['canceled']['user_mail_status_canceled_subject'] = array(
+  $form['email_canceled']['user_mail_status_canceled_subject'] = array(
     '#type' => 'textfield',
     '#title' => t('Subject'),
     '#default_value' => _user_mail_text('status_canceled_subject'),
     '#maxlength' => 180,
   );
-  $form['email']['canceled']['user_mail_status_canceled_body'] = array(
+  $form['email_canceled']['user_mail_status_canceled_body'] = array(
     '#type' => 'textarea',
     '#title' => t('Body'),
     '#default_value' => _user_mail_text('status_canceled_body'),
     '#rows' => 3,
   );
 
-  // User signatures.
-  $form['signatures'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Signatures'),
-  );
-  $form['signatures']['user_signatures'] = array(
-    '#type' => 'radios',
-    '#title' => t('Signature support'),
-    '#default_value' => variable_get('user_signatures', 0),
-    '#options' => array(t('Disabled'), t('Enabled')),
-  );
-
-  // If picture support is enabled, check whether the picture directory exists:
-  if (variable_get('user_pictures', 0)) {
-    $picture_path = file_create_path(variable_get('user_picture_path', 'pictures'));
-    file_check_directory($picture_path, FILE_CREATE_DIRECTORY, 'user_picture_path');
-  }
-
-  $form['pictures'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Pictures'),
-  );
-  $picture_support = variable_get('user_pictures', 0);
-  $form['pictures']['user_pictures'] = array(
-    '#type' => 'radios',
-    '#title' => t('Picture support'),
-    '#default_value' => $picture_support,
-    '#options' => array(t('Disabled'), t('Enabled')),
-    '#prefix' => '<div class="user-admin-picture-radios">',
-    '#suffix' => '</div>',
-  );
-  drupal_add_js(drupal_get_path('module', 'user') . '/user.js');
-  // If JS is enabled, and the radio is defaulting to off, hide all
-  // the settings on page load via .css using the js-hide class so
-  // that there's no flicker.
-  $css_class = 'user-admin-picture-settings';
-  if (!$picture_support) {
-    $css_class .= ' js-hide';
-  }
-  $form['pictures']['settings'] = array(
-    '#prefix' => '<div class="' . $css_class . '">',
-    '#suffix' => '</div>',
-  );
-  $form['pictures']['settings']['user_picture_path'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Picture image path'),
-    '#default_value' => variable_get('user_picture_path', 'pictures'),
-    '#size' => 30,
-    '#maxlength' => 255,
-    '#description' => t('Subdirectory in the directory %dir where pictures will be stored.', array('%dir' => file_directory_path() . '/')),
-  );
-  $form['pictures']['settings']['user_picture_default'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Default picture'),
-    '#default_value' => variable_get('user_picture_default', ''),
-    '#size' => 30,
-    '#maxlength' => 255,
-    '#description' => t('URL of picture to display for users with no custom picture selected. Leave blank for none.'),
-  );
-  $form['pictures']['settings']['user_picture_dimensions'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Picture maximum dimensions'),
-    '#default_value' => variable_get('user_picture_dimensions', '85x85'),
-    '#size' => 15,
-    '#maxlength' => 10,
-    '#description' => t('Maximum dimensions for pictures, in pixels.'),
-  );
-  $form['pictures']['settings']['user_picture_file_size'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Picture maximum file size'),
-    '#default_value' => variable_get('user_picture_file_size', '30'),
-    '#size' => 15,
-    '#maxlength' => 10,
-    '#description' => t('Maximum file size for pictures, in kB.'),
-  );
-  $form['pictures']['settings']['user_picture_guidelines'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Picture guidelines'),
-    '#default_value' => variable_get('user_picture_guidelines', ''),
-    '#description' => t("This text is displayed at the picture upload form in addition to the default guidelines. It's useful for helping or instructing your users."),
-  );
-
   return system_settings_form($form, FALSE);
 }
 
Index: modules/user/user.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.js,v
retrieving revision 1.13
diff -u -p -r1.13 user.js
--- modules/user/user.js	27 Apr 2009 20:19:38 -0000	1.13
+++ modules/user/user.js	9 May 2009 19:11:13 -0000
@@ -161,14 +161,13 @@ Drupal.evaluatePasswordStrength = functi
 };
 
 /**
- * On the admin/user/settings page, conditionally show all of the
- * picture-related form elements depending on the current value of the
- * "Picture support" radio buttons.
+ * Show all of the picture-related form elements at admin/user/settings
+ * depending on whether user pictures are enabled or not.
  */
 Drupal.behaviors.userSettings = {
   attach: function (context, settings) {
-    $('div.user-admin-picture-radios input[type=radio]:not(.userSettings-processed)', context).addClass('userSettings-processed').click(function () {
-      $('div.user-admin-picture-settings', context)[['hide', 'show'][this.value]]();
+    $('#edit-user-pictures', context).change(function () {
+      $('div.user-admin-picture-settings', context).toggle();
     });
   }
 };
