diff -u -r -N cvbuilder-cvs.orig/cvbuilder.install cvbuilder-cvs/cvbuilder.install --- cvbuilder-cvs.orig/cvbuilder.install 1969-12-31 16:00:00.000000000 -0800 +++ cvbuilder-cvs/cvbuilder.install 2006-06-30 23:55:42.000000000 -0700 @@ -0,0 +1,90 @@ + array('name' => 'cvbuilder_address', 'base' => 'cvbuilder_address'), + 'cvbuilder_experience' => array('name' => 'cvbuilder_experience', 'base' => 'cvbuilder_experience'), + 'cvbuilder_schoolcollege' => array('name' => 'cvbuilder_schoolcollege', 'base' => 'cvbuilder_schoolcollege'), + 'cvbuilder_skills' => array('name' => 'cvbuilder_skills', 'base' => 'cvbuilder_skills'), + 'cvbuilder_referee' => array('name' => 'cvbuilder_referee', 'base' => 'cvbuilder_referee') + ); +} /** * Implementation of hook_access(). @@ -251,14 +266,52 @@ $output .= implode('', taxonomy_node_form('cvbuilder_referee', $node)); } + $form['title'] = array( + '#type' => 'textfield', + '#title' => t('Title'), + '#default_value' => $node->title, + '#size' => 60, + '#maxlength' => 128, + '#description' => NULL, + '#attributes' => NULL, + '#required' => TRUE, + ); + + // Now we define the form elements specific to our node type. // $output .= form_textarea(t('Body'), 'body', $node->body, 60, 20); // $output .= filter_form('format', $node->format); - $output .= form_textfield(t('Position'), 'position', $node->position, 60, 128, 'Enter a description for this referee. For example: a former employer may be described as "Managing Director, The Widget Company Ltd."'); - $output .= form_textfield(t('Contact details'), 'address', $node->address, 60, 128, 'Enter contact details for this referee. For example: "123 Fake Street, Springfield. Tel: 020 0000 0000"'); - $output .= form_textfield(t('Relationship to you'), 'relationship', $node->relationship, 60, 128, 'How do you know this referee? Examples: "Previous employer","School teacher","College lecturer"'); - $output .= form_checkbox(t('Tick this box if you don\'t mind employers contacting this referee without asking you first'), 'maycontact', 1, $node->maycontact); - return $output; + $form["position"] = array( + '#type' => 'textfield', + '#title' => t("Position"), + '#default_value' => $node->position, + '#size' => 60, + '#maxlength' => 128, + '#description' => t('Enter a description for this referee. For example: a former employer may be described as "Managing Director, The Widget Company Ltd."'), + ); + $form["address"] = array( + '#type' => 'textfield', + '#title' => t("Contact details"), + '#default_value' => $node->address, + '#size' => 60, + '#maxlength' => 128, + '#description' => t('Enter contact details for this referee. For example: "123 Fake Street, Springfield. Tel: 020 0000 0000"'), + ); + $form["relationship"] = array( + '#type' => 'textfield', + '#title' => t('Relationship to you'), + '#default_value' => $node->relationship, + '#size' => 60, + '#maxlength' => 128, + '#description' => t('How do you know this referee? Examples: "Previous employer","School teacher","College lecturer"'), + ); + $form["maycontact"] = array( + '#type' => 'checkbox', + '#title' => t('Tick this box if you don\'t mind employers contacting this referee without asking you first'), + '#return_value' => TRUE, + '#default_value' => $node->maycontact, + ); + return $form; } function cvbuilder_skills_form(&$node) { @@ -268,9 +321,27 @@ if (function_exists('taxonomy_node_form')) { $output .= implode('', taxonomy_node_form('cvbuilder_skills', $node)); } + $form['title'] = array( + '#type' => 'textfield', + '#title' => t('Title'), + '#default_value' => $node->title, + '#size' => 60, + '#maxlength' => 128, + '#description' => NULL, + '#attributes' => NULL, + '#required' => TRUE, + ); + + $form["description"] = array( + '#type' => 'textarea', + '#title' => t('Details'), + '#default_value' => $node->description, + '#cols' => 60, + '#rows' => 10, + '#description' => t("Enter details of these job skills in this box."), + ); - $output .= form_textarea(t('Details'), 'description', $node->description, 60, 10, 'Enter details of these job skills in this box.'); - return $output; + return $form; } function cvbuilder_schoolcollege_form(&$node) { @@ -289,14 +360,64 @@ if (function_exists('taxonomy_node_form')) { $output .= implode('', taxonomy_node_form('cvbuilder_referee', $node)); } + $form['title'] = array( + '#type' => 'textfield', + '#title' => t('Title'), + '#default_value' => $node->title, + '#size' => 60, + '#maxlength' => 128, + '#description' => NULL, + '#attributes' => NULL, + '#required' => TRUE, + ); + + $form["startdate_month"] = array( + '#type' => 'select', + '#title' => t('Start month'), + '#default_value' => $node->startdate_month, + '#options' => $months, + ); + + $form["startdate_year"] = array( + '#type' => 'select', + '#title' => t('Start year'), + '#default_value' => $node->startdate_year, + '#options' => $years, + ); + + $form["enddate_month"] = array( + '#type' => 'select', + '#title' => t('End month'), + '#default_value' => $node->enddate_month, + '#options' => $months, + ); + + $form["enddate_year"] = array( + '#type' => 'select', + '#title' => t('End year'), + '#default_value' => $node->enddate_year, + '#options' => $years, + ); + + $form["address"] = array( + '#type' => 'textfield', + '#title' => t('Address'), + '#default_value' => $node->address, + '#size' => 60, + '#maxlength' => 128, + '#description' => t('Tell us where this school or college is. For example: "Education Street, Anytown AN1 7OW"'), + ); + + $form["quals"] = array( + '#type' => 'textarea', + '#title' => t('Qualifications gained'), + '#default_value' => $node->quals, + '#cols' => 60, + '#rows' => 10, + '#description' => t("Describe what qualifications you acquired at this place of education."), + ); - $output .= form_select(t('Start month'), 'startdate_month', $node->startdate_month, $months); - $output .= form_select(t('Start year'), 'startdate_year', $node->startdate_year, $years); - $output .= form_select(t('End month'), 'enddate_month', $node->enddate_month, $months); - $output .= form_select(t('End year'), 'enddate_year', $node->enddate_year, $years); - $output .= form_textfield(t('Address'), 'address', $node->address, 60, 128, 'Tell us where this school or college is. For example: "Education Street, Anytown AN1 7OW"'); - $output .= form_textarea(t('Qualifications gained'), 'quals', $node->quals, 60, 10, 'Describe what qualifications you acquired at this place of education.'); - return $output; + return $form; } function cvbuilder_address_form(&$node) { @@ -306,16 +427,80 @@ if (function_exists('taxonomy_node_form')) { $output .= implode('', taxonomy_node_form('cvbuilder_referee', $node)); } + + $form['title'] = array( + '#type' => 'textfield', + '#title' => t('Title'), + '#default_value' => $node->title, + '#size' => 60, + '#maxlength' => 128, + '#description' => NULL, + '#attributes' => NULL, + '#required' => TRUE, + ); - $output .= form_textfield(t('Address line 1'), 'address1', $node->address1, 60, 255, 'Enter your address.'); - $output .= form_textfield(t('Address line 2'), 'address2', $node->address2, 60, 255); - $output .= form_textfield(t('Town'), 'town', $node->town, 60, 255); - $output .= form_textfield(t('County'), 'county', $node->county, 60, 255); - $output .= form_textfield(t('Postcode'), 'postcode', $node->postcode, 20, 20); - $output .= form_textfield(t('Phone number'), 'phone', $node->phone, 20, 20, 'If you can be contacted by telephone, enter your contact phone number here.'); - $output .= form_textfield(t('Email address'), 'email', $node->email, 20, 50, 'If you can be contacted by email, enter your email address here.'); - $output .= form_textfield(t('Web site'), 'web', $node->web, 30, 255, 'If you have a web site you\'d like to include, enter the address here.'); - return $output; + $form['address1'] = array( + '#type' => 'textfield', + '#title' => t('Address line 1'), + '#default_value' => $node->address1, + '#size' => 60, + '#maxlength' => 255, + '#description' => t('Enter your address.'), + ); + $form['address2'] = array( + '#type' => 'textfield', + '#title' => t('Address line 2'), + '#default_value' => $node->address2, + '#size' => 60, + '#maxlength' => 255, + ); + $form['town'] = array( + '#type' => 'textfield', + '#title' => t('Town'), + '#default_value' => $node->town, + '#size' => 60, + '#maxlength' => 255, + ); + $form['county'] = array( + '#type' => 'textfield', + '#title' => t('County'), + '#default_value' => $node->county, + '#size' => 60, + '#maxlength' => 255, + ); + $form['postcode'] = array( + '#type' => 'textfield', + '#title' => t('Postcode'), + '#default_value' => $node->postcode, + '#size' => 20, + '#maxlength' => 20, + ); + $form['phone'] = array( + '#type' => 'textfield', + '#title' => t('Phone number'), + '#default_value' => $node->phone, + '#size' => 20, + '#maxlength' => 20, + '#description' => t('If you can be contacted by telephone, enter your contact phone number here.'), + ); + $form['email'] = array( + '#type' => 'textfield', + '#title' => t('Email address'), + '#default_value' => $node->email, + '#size' => 20, + '#maxlength' => 50, + '#description' => t('If you can be contacted by email, enter your email address here.'), + ); + $form['web'] = array( + '#type' => 'textfield', + '#title' => t('Web site'), + '#default_value' => $node->web, + '#size' => 30, + '#maxlength' => 255, + '#description' =>t('If you have a web site you\'d like to include, enter the address here.'), + ); + + return $form; } function cvbuilder_experience_form(&$node) { @@ -335,15 +520,72 @@ if (function_exists('taxonomy_node_form')) { $output .= implode('', taxonomy_node_form('cvbuilder_experience', $node)); } + $form['title'] = array( + '#type' => 'textfield', + '#title' => t('Job Title'), + '#default_value' => $node->title, + '#size' => 60, + '#maxlength' => 128, + '#description' => NULL, + '#attributes' => NULL, + '#required' => TRUE, + ); + $form["startdate_month"] = array( + '#type' => 'select', + '#title' => t('Start month'), + '#default_value' => $node->startdate_month, + '#options' => $months, + ); + + $form["startdate_year"] = array( + '#type' => 'select', + '#title' => t('Start year'), + '#default_value' => $node->startdate_year, + '#options' => $years, + ); + + $form["enddate_month"] = array( + '#type' => 'select', + '#title' => t('End month'), + '#default_value' => $node->enddate_month, + '#options' => $months, + ); + + $form["enddate_year"] = array( + '#type' => 'select', + '#title' => t('End year'), + '#default_value' => $node->enddate_year, + '#options' => $years, + ); + + $form['employeraddress'] = array( + '#type' => 'textfield', + '#title' => t('Address'), + '#default_value' => $node->employeraddress, + '#size' => 60, + '#maxlength' => 128, + '#description' => t('Tell us where this employer is. For example: "Widget Street, Anytown AN1 7OW"'), + ); + + $form["duties"] = array( + '#type' => 'textarea', + '#title' => t('Duties'), + '#default_value' => $node->duties, + '#cols' => 60, + '#rows' => 10, + '#description' => t("Describe what you did here, and what your responsibilities were."), + ); + + $form["achievements"] = array( + '#type' => 'textarea', + '#title' => t('Achievements'), + '#default_value' => $node->achievements, + '#cols' => 60, + '#rows' => 10, + '#description' => t("Use this space to say what you think you accomplished here, or what new things you learned."), + ); - $output .= form_select(t('Start month'), 'startdate_month', $node->startdate_month, $months); - $output .= form_select(t('Start year'), 'startdate_year', $node->startdate_year, $years); - $output .= form_select(t('End month'), 'enddate_month', $node->enddate_month, $months); - $output .= form_select(t('End year'), 'enddate_year', $node->enddate_year, $years); - $output .= form_textfield(t('Address'), 'employeraddress', $node->employeraddress, 60, 128, 'Tell us where this employer is. For example: "Widget Street, Anytown AN1 7OW"'); - $output .= form_textarea(t('Duties'), 'duties', $node->duties, 60, 10, 'Describe what you did here, and what your responsibilities were.'); - $output .= form_textarea(t('Achievements'), 'achievements', $node->achievements, 60, 10, 'Use this space to say what you think you accomplished here, or what new things you learned.'); - return $output; + return $form; }