Index: openid_cp_field.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_cp_field/Attic/openid_cp_field.css,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 openid_cp_field.css
--- openid_cp_field.css	18 Apr 2009 14:22:28 -0000	1.1.2.1
+++ openid_cp_field.css	21 Apr 2009 14:22:55 -0000
@@ -1,4 +1,4 @@
-/* $id */
+/* $Id */
 
 #edit-map-a-wrapper {
   float:left;
@@ -10,30 +10,8 @@
   padding-left: 10px;
 }
 
-#edit-sreg-map-a-wrapper {
-  float:left;
-  padding-right: 10px;
-}
-
-#edit-sreg-map-b-wrapper {
-  float:left;
-  padding-left: 10px;
-}
-
 #edit-submit {
   display:inline;
   margin-top: 31px;
   margin-left: 10px;
 }
-
-#edit-submit {
-  display:inline;
-  margin-top: 31px;
-  margin-left: 10px;
-}
-
-#edit-submit-1 {
-  display:inline;
-  margin-top: 31px;
-  margin-left: 10px;
-}
Index: openid_cp_field.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_cp_field/openid_cp_field.module,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 openid_cp_field.module
--- openid_cp_field.module	21 Apr 2009 12:34:29 -0000	1.1.2.6
+++ openid_cp_field.module	21 Apr 2009 14:22:55 -0000
@@ -25,7 +25,7 @@ function openid_cp_field_menu() {
   $types = array_keys(content_profile_get_types('names'));
   foreach ($types as $type) {
     $items['admin/content/node-type/'. str_replace('_', '-', $type) .'/cp-field'] = array(
-      'title' => 'OpenID Content Profile Field mapping',
+      'title' => 'OpenID field mapping',
       'page callback' => 'drupal_get_form',
       'page arguments' => array('openid_cp_field_map', $type),
       'access arguments' => array('administer openid cp field'),
@@ -93,14 +93,14 @@ function openid_cp_field_map($form_state
 
   foreach ($openid_attrs as $id => $attr) {
     if (!in_array($id, $already_mapped_openid)) {
-      $options_openid += array($id => $attr['label']);
+      $options_openid += array($id => 'AX: '. $attr['label']);
     }
   }
 
   $openid_sreg_fields = array();
   foreach ($openid_attrs as $id => $attr) {
     if (isset($attr['sreg']) && !in_array($attr['sreg'], $already_mapped_sreg)) {
-      $openid_sreg_fields += array($attr['sreg'] => $attr['label']);
+      $openid_sreg_fields += array($attr['sreg'] => 'SReg: '. $attr['label']);
     }
   }
 
@@ -108,7 +108,7 @@ function openid_cp_field_map($form_state
   $rows = array();
   foreach ($mapping as $openid => $node) {
     $node_label = isset($type['fields'][$node]['widget']['label']) ? $type['fields'][$node]['widget']['label'] : $node_type[$node .'_label'];
-    $rows[] = array('node' => $node_label, 'openid' => $openid_attrs[$openid]['label'], 'link' => l(t('Delete'), "openid_cp_field/delete/{$type['type']}/". base64_encode($openid)));
+    $rows[] = array('node' => $node_label, 'openid' => 'AX: '. $openid_attrs[$openid]['label'], 'link' => l(t('Delete'), "openid_cp_field/delete/{$type['type']}/". base64_encode($openid)));
   }
   // Collect sreg labels
   $sreg_fields = array();
@@ -119,7 +119,7 @@ function openid_cp_field_map($form_state
   }
   foreach ($mapping_sreg as $openid => $node) {
     $node_label = isset($type['fields'][$node]['widget']['label']) ? $type['fields'][$node]['widget']['label'] : $node_type[$node .'_label'];
-    $rows[] = array('node' => $node_label, 'openid' => $sreg_fields[$openid] . ' (SReg)', 'link' => l(t('Delete'), "openid_cp_field/delete/{$type['type']}/". base64_encode($openid) .'/sreg'));
+    $rows[] = array('node' => $node_label, 'openid' => 'SReg: '. $sreg_fields[$openid], 'link' => l(t('Delete'), "openid_cp_field/delete/{$type['type']}/". base64_encode($openid) .'/sreg'));
   }
   if (count($rows) > 0) {
     $current_map = theme('table', array('node' => t('Node field'), 'openid' => t('OpenID'), 'link' => t('Operation')), $rows);
@@ -153,7 +153,7 @@ function openid_cp_field_map($form_state
     '#type' => 'fieldset',
     '#title' => t('Define a relationship between OpenID attributes and CCK fields'),
   );
-  if (count($options_node) == 0 || count($openid_attrs) == 0) {
+  if (count($options_node) == 0 || (count($openid_attrs) == 0 && count($openid_sreg_fields) == 0)) {
     $form['map']['info'] = array('#value' => t('No more fields to map, please delete a relationship if you want to modify the current mapping.'));
   }
   else {
@@ -165,37 +165,14 @@ function openid_cp_field_map($form_state
     );
     $form['map']['map_b'] = array(
       '#type' => 'select',
-      '#title' => t('OpenID Attribute'),
-      '#options' => $options_openid,
+      '#title' => t('OpenID field'),
+      '#options' => $options_openid + $openid_sreg_fields,
     );
     $form['map']['submit'] = array(
       '#type' => 'submit',
       '#value' => t('Add'),
     );
   }
-  $form['map_sreg'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Define a relationship between OpenID Simple Registration fields and CCK fields'),
-  );
-  if (count($options_node) == 0 || count($openid_sreg_fields) == 0) {
-    $form['map_sreg']['info'] = array('#value' => t('No more fields to map, please delete a relationship if you want to modify the current mapping.'));
-  }
-  else {
-    $form['map_sreg']['sreg_map_a'] = array(
-      '#type' => 'select',
-      '#title' => t('Node field'),
-      '#options' => $options_node,
-    );
-    $form['map_sreg']['sreg_map_b'] = array(
-      '#type' => 'select',
-      '#title' => t('SReg Field'),
-      '#options' => $openid_sreg_fields,
-    );
-    $form['map_sreg']['submit'] = array(
-      '#type' => 'submit',
-      '#value' => t('Add SReg'),
-    );
-  }
   $form['type'] = array(
       '#type' => 'value',
       '#value' => $type['type'],
@@ -209,12 +186,10 @@ function openid_cp_field_map($form_state
 function openid_cp_field_map_submit($form, &$form_state) {
   $type = $form_state['values']['type'];
   switch ($form_state['values']['op']) {
-    case t('Add SReg'):
-      $type .= '_sreg';
-      $form_state['values']['map_b'] = $form_state['values']['sreg_map_b'];
-      $form_state['values']['map_a'] = $form_state['values']['sreg_map_a'];
-      // Warning: fall-through
     case t('Add'):
+      if (strstr($form_state['values']['map_b'], 'openid.sreg.')) {
+        $type .= '_sreg';
+      }
       $mapping = array();
       openid_cp_field_get_mapping($mapping, $type);
       if (!empty($form_state['values']['map_b']) && !empty($form_state['values']['map_a'])) {
