Index: modules/contact/contact.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v
retrieving revision 1.6
diff -u -p -r1.6 contact.pages.inc
--- modules/contact/contact.pages.inc	16 Jan 2008 22:56:21 -0000	1.6
+++ modules/contact/contact.pages.inc	10 Feb 2008 21:40:36 -0000
@@ -39,19 +39,20 @@ function contact_mail_page() {
   if (count($categories) > 0) {
     $form['#token'] = $user->uid ? $user->name . $user->mail : '';
     $form['contact_information'] = array('#value' => filter_xss_admin(variable_get('contact_form_information', t('You can leave a message using the contact form below.'))));
-    $form['name'] = array('#type' => 'textfield',
+    $form['contact_information']['#tree'] = TRUE;
+    $form['contact_information']['name'] = array('#type' => 'textfield',
       '#title' => t('Your name'),
       '#maxlength' => 255,
       '#default_value' => $user->uid ? $user->name : '',
       '#required' => TRUE,
     );
-    $form['mail'] = array('#type' => 'textfield',
+    $form['contact_information']['mail'] = array('#type' => 'textfield',
       '#title' => t('Your e-mail address'),
       '#maxlength' => 255,
       '#default_value' => $user->uid ? $user->mail : '',
       '#required' => TRUE,
     );
-    $form['subject'] = array('#type' => 'textfield',
+    $form['contact_information']['subject'] = array('#type' => 'textfield',
       '#title' => t('Subject'),
       '#maxlength' => 255,
       '#required' => TRUE,
@@ -63,7 +64,7 @@ function contact_mail_page() {
         $default_category = t('- Please choose -');
         $categories = array($default_category) + $categories;
       }
-      $form['cid'] = array('#type' => 'select',
+      $form['contact_information']['cid'] = array('#type' => 'select',
         '#title' => t('Category'),
         '#default_value' => $default_category,
         '#options' => $categories,
@@ -73,25 +74,25 @@ function contact_mail_page() {
     else {
       // If there is only one category, store its cid.
       $category_keys = array_keys($categories);
-      $form['cid'] = array('#type' => 'value',
+      $form['contact_information']['cid'] = array('#type' => 'value',
         '#value' => array_shift($category_keys),
       );
     }
-    $form['message'] = array('#type' => 'textarea',
+    $form['contact_information']['message'] = array('#type' => 'textarea',
       '#title' => t('Message'),
       '#required' => TRUE,
     );
     // We do not allow anonymous users to send themselves a copy
     // because it can be abused to spam people.
     if ($user->uid) {
-      $form['copy'] = array('#type' => 'checkbox',
+      $form['contact_information']['copy'] = array('#type' => 'checkbox',
         '#title' => t('Send yourself a copy.'),
       );
     }
     else {
-      $form['copy'] = array('#type' => 'value', '#value' => FALSE);
+      $form['contact_information']['copy'] = array('#type' => 'value', '#value' => FALSE);
     }
-    $form['submit'] = array('#type' => 'submit',
+    $form['contact_information']['submit'] = array('#type' => 'submit',
       '#value' => t('Send e-mail'),
     );
   }
@@ -105,11 +106,11 @@ function contact_mail_page() {
  * Validate the site-wide contact page form submission.
  */
 function contact_mail_page_validate($form, &$form_state) {
-  if (!$form_state['values']['cid']) {
+  if (!$form_state['values']['contact_information']['cid']) {
     form_set_error('category', t('You must select a valid category.'));
   }
-  if (!valid_email_address($form_state['values']['mail'])) {
-    form_set_error('mail', t('You must enter a valid e-mail address.'));
+  if (!valid_email_address($form_state['values']['contact_information']['mail'])) {
+    form_set_error("contact_information']['mail", t('You must enter a valid e-mail address.'));
   }
 }
 
@@ -119,7 +120,7 @@ function contact_mail_page_validate($for
 function contact_mail_page_submit($form, &$form_state) {
   global $language;
 
-  $values = $form_state['values'];
+  $values = $form_state['values']['contact_information'];
 
   // E-mail address of the sender: as the form field is a text field,
   // all instances of \r and \n have been automatically stripped from it.
Index: modules/openid/openid.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.js,v
retrieving revision 1.6
diff -u -p -r1.6 openid.js
--- modules/openid/openid.js	30 Jan 2008 22:11:22 -0000	1.6
+++ modules/openid/openid.js	10 Feb 2008 21:40:36 -0000
@@ -1,7 +1,14 @@
 // $Id: openid.js,v 1.6 2008/01/30 22:11:22 goba Exp $
 
 Drupal.behaviors.openid = function (context) {
-  var $loginElements = $("#edit-name-wrapper, #edit-pass-wrapper, li.openid-link");
+  // The login form has a different id for block vs. page presentation.
+  if ($("#user-login-form").size()) {
+    $prefix = "#user-login-form ";
+  }
+  else {
+    $prefix = "#user-login ";
+  }
+  var $loginElements = $($prefix + "#edit-name-wrapper, " + $prefix + "#edit-pass-wrapper, li.openid-link");
   var $openidElements = $("#edit-openid-identifier-wrapper, li.user-link");
 
   // This behavior attaches by ID, so is only valid once on a page.
@@ -17,7 +24,7 @@ Drupal.behaviors.openid = function (cont
        $loginElements.hide();
        $openidElements.css("display", "block");
       // Remove possible error message.
-      $("#edit-name, #edit-pass").removeClass("error");
+      $($prefix + "#edit-name-wrapper, " + $prefix + "#edit-pass-wrapper").removeClass("error");
       $("div.messages.error").hide();
       // Set focus on OpenID Identifier field.
       $("#edit-openid-identifier")[0].focus();
@@ -32,7 +39,7 @@ Drupal.behaviors.openid = function (cont
       $("#edit-openid-identifier").val('').removeClass("error");
       $("div.messages.error").css("display", "block");
       // Set focus on username field.
-      $("#edit-name")[0].focus();
+      $($prefix + "#edit-name")[0].focus();
       return false;
     });
 };
