Change CSV processing and studygroup display info

This commit is contained in:
2016-02-01 20:31:29 +11:00
parent ba0ee914f9
commit 74eccf57d3
4 changed files with 31 additions and 11 deletions

View File

@@ -1362,7 +1362,6 @@ function booking_form_submit($form, &$form_state) {
$node->booking_lifesaver = empty($values['booking_lifesaver']) ? 'N' : ($values['booking_lifesaver'] == 1 ? 'Y' : 'N');
$node->booking_doctor = empty($values['booking_doctor']) ? 'N' : ($values['booking_doctor'] == 1 ? 'Y' : 'N');
$node->booking_dietary = empty($values['booking_dietary']) ? 'N/A' : $values['booking_dietary'];
$node->booking_medical_conditions = empty($values['booking_medical_conditions']) ? 'N/A' : $values['booking_medical_conditions'];
$node->booking_mission_experience_details = empty($values['booking_mission_experience_details']) ? 'N/A' : $values['booking_mission_experience_details'];
$node->booking_has_mission_experience = empty($values['booking_has_mission_experience']) ? 'N' : ($values['booking_has_mission_experience'] == 1 ? 'Y' : 'N');
$node->booking_skills_builder = empty($values['booking_skills_builder']) ? 'N' : ($values['booking_skills_builder'] == 1 ? 'Y' : 'N');
@@ -1372,8 +1371,13 @@ function booking_form_submit($form, &$form_state) {
$node->booking_skills_language_details = empty($values['booking_skills_language_details']) ? 'N/A' : $values['booking_skills_language_details'];
$node->booking_skills_other = empty($values['booking_skills_other']) ? 'N' : ($values['booking_skills_other'] == 1 ? 'Y' : 'N');
$node->booking_skills_other_details = empty($values['booking_skills_other_details']) ? 'N/A' : $values['booking_skills_other_details'];
$node->booking_comment_field = empty($values['booking_comment_field']) ? '' : $values['booking_comment_field'];
//remove newlines from these fields so the CSV output doesn't get messed up
$medical = empty($values['booking_medical_conditions']) ? 'N/A' : $values['booking_medical_conditions'];
$comment = empty($values['booking_comment_field']) ? '' : $values['booking_comment_field'];
$node->booking_medical_conditions = str_replace(PHP_EOL, '', $medical);
$node->booking_comment_field = str_replace(PHP_EOL, '', $comment);
//potential fields for future
//$node->booking_payment_method = $payment_method;
$node->booking_room_mate1 = empty($values['booking_room_mate1']) ? '' : $values['booking_room_mate1'];