Index: modules/project/issue.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/issue.inc,v
retrieving revision 1.129
diff -u -r1.129 issue.inc
--- modules/project/issue.inc	13 Oct 2005 13:33:09 -0000	1.129
+++ modules/project/issue.inc	13 Oct 2005 15:32:45 -0000
@@ -300,45 +300,46 @@
       );
     }
 
-    $group1 = form_select(t('Project'), 'pid', $node->pid, $projects, NULL, 0, FALSE, TRUE);
+    /* Project information fieldset - style used to be div.admin div.options */
+    $form['project_info'] = array('#type' => 'fieldset', '#title' => t('Project information'));
+    $form['project_info']['pid'] = array('#type' => 'select', '#title' => t('Project'), '#default_value' => $node->pid, '#options' => $projects, '#required' => TRUE);
     if ($releases) {
-      $group1 .= form_select(t('Version'), 'rid', $node->rid, $releases, NULL, 0, FALSE, TRUE);
+      $form['project_info']['rid'] = array('#type' => 'select', '#title' => t('Version'), '#default_value' => $node->rid, '#options' => $releases, '#required' => TRUE);
     }
-    $group1 .= form_select(t('Component'), 'component', $node->component, $components, NULL, 0, FALSE, TRUE);
+    $form['project_info']['component'] = array('#type' => 'select', '#title' => t('Component'), '#default_value' => $node->component, '#options' => $components, '#required' => TRUE);
 
-    $group2 = form_select(t('Category'), 'category', $node->category, $categories, NULL, 0, FALSE, TRUE);
-    $group2 .= form_select(t('Priority'), 'priority', $node->priority, $priorities);
-    $group2 .= form_select(t('Assigned'), 'assigned', $node->assigned, $assigned);
+    /* Issue information fieldset - style used to be div.admin div.options */
+    $form['issue_info'] = array('#type' => 'fieldset', '#title' => t('Issue information'));
+    $form['issue_info']['category'] = array('#type' => 'select', '#title' => t('Category'), '#default_value' => $node->category, '#options' => $categories, '#required' => TRUE);
+    $form['issue_info']['priority'] = array('#type' => 'select', '#title' => t('Priority'), '#default_value' => $node->priority, '#options' => $priorities);
+    $form['issue_info']['assigned'] = array('#type' => 'select', '#title' => t('Assigned'), '#default_value' => $node->assigned, '#options' => $assigned);
     if (count($states) > 1) {
-      $group2 .= form_select(t('Status'), 'sid', $node->sid ? $node->sid : $default_state, $states);
+      $form['issue_info']['sid'] = array('#type' => 'select', '#title' => t('Status'), '#default_value' => $node->sid ? $node->sid : $default_state, '#options' => $states);
     }
     else {
-      $group2 .= form_hidden('sid', $default_state);
-      $group2 .= form_item(t('Status'), project_issue_state($default_state));
+      $form['issue_info']['sid']    = array('#type' => 'hidden', '#default_value' => $default_state);
+      $form['issue_info']['status'] = array('#type' => 'item', '#title' => t('Status'), '#default_value' => project_issue_state($default_state));
     }
-    $output .= '</div>';
-    $output .= '<div class="admin">';
-    $output .= '<div class="options">'. form_group(t('Project information'), $group1) .'</div>';
-    $output .= '<div class="options">'. form_group(t('Issue information'), $group2) .'</div>';
-    $output .= '</div>';
-    $output .= '<div class="standard">';
 
+    /* 'Issue Details' fieldset - style used to be div.standard  */
+    $form['issue_details'] = array( '#type' => 'fieldset', '#title' => t('Issue Details'));
     if (function_exists('taxonomy_node_form')) {
-      $output .= implode('', taxonomy_node_form($node->type, $node));
+      $form['issue_details']['taxonomy'] = taxonomy_node_form($node->type, $node);
     }
+    $form['issue_details']['title']      = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $node->title, '#size' => 60, '#maxlength' => 128, '#required' => TRUE);
+    $form['issue_details']['body']       = array('#type' => 'textarea', '#title' => t('Description'), '#default_value' => $node->body, '#rows' => 40, '#cols' => 10, '#required' => !$node->comment);
+    $form['issue_details']['file_issue'] = array('#type' => 'file', '#title' => t('File attachment'), '#size' => 40, '#description' => ($node->file || $node->file_path ? t('A file already exists, if you upload another file the current file will be replaced.') : t('Optionally attach a file, for example a patch or a screenshot.')));
+
+    $form['format'] =  filter_form($node->format);
 
-    $output .= form_textfield(t('Title'), 'title', $node->title, 60, 128, NULL, NULL, TRUE);
-    $output .= form_textarea('Description', 'body', $node->body, 60, 20, NULL, NULL, !$node->comment);
-    $output .= filter_form('format', $node->format);
-    $output .= form_file(t('File attachment'), 'file_issue', 40, ($node->file || $node->file_path ? t('A file already exists, if you upload another file the current file will be replaced.') : t('Optionally attach a file, for example a patch or a screenshot.')));
   }
   else {
-    $output = form_select(t('Project'), 'pid', $node->pid, $projects);
+    $form['pid'] = array('#type' => 'select', '#title' => t('Project'), '#default_value' => $node->pid, '#options' => $projects, '#required' => TRUE);
     // Add a field indicating that this is a multi-stage submission.
-    $output .= form_hidden('wizard', 1);
+    $form['wizard'] = array('#type' => 'hidden', '#default_value' => 1);
   }
 
-  return $output;
+  return $form;
 }
 
 function project_issue_validate(&$node) {
