Fix the way study group sessions were queried

This commit is contained in:
2015-07-23 20:04:29 +10:00
parent 35d41db948
commit fa24cb3350
4 changed files with 79 additions and 22 deletions

View File

@@ -58,6 +58,7 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
date_default_timezone_set(date_default_timezone(FALSE));
//calculate what years to show in the date of birth field
//along with some fudge factors to handle dates partway through the year
$min_dob_years = _booking_year_offset(variable_get('booking_min_dob','1970-01-01 00:00:00')) + 1;
$max_dob_years = _booking_year_offset(variable_get('booking_max_dob','1970-01-01 00:00:00')) - 1;
$date_year_range = "-" . $min_dob_years . ':-' . $max_dob_years;
@@ -496,7 +497,7 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
$form['emergency']['booking_guardian_type'] = array(
'#type' => 'radios',
'#title' => t('Relation to you'),
'#options' => $emergency_contact_type_options,
'#options' => _booking_get_emergency_contact_types(),
'#default_value' => empty($data->booking_guardian_type) ? 'parent' : $data->booking_guardian_type,
'#required' => TRUE
);