Provide option to disable maximum age check

This commit is contained in:
2015-03-18 12:09:50 +11:00
parent 5aa285e9dc
commit 7e6b59707d
3 changed files with 13 additions and 5 deletions

View File

@@ -80,11 +80,19 @@ function booking_admin() {
'#date_label_position' => 'within',
'#date_year_range' => '-60:-10'
);
$form['attendee']['booking_enable_min_age_restriction'] = array (
'#type' => 'radios',
'#title' => t('Enable old age restriction?'),
'#description' => t('Set this to Yes if you wish to prevent people over the age defined below from registering.'),
'#options' => array (0 => t('No'), t('Yes')),
'#default_value' => variable_get('booking_enable_min_age_restriction', 1),
);
$form['attendee']['booking_min_dob'] = array (
'#type' => 'date_select',
'#title' => t('Minimum Date of Birth'),
'#description' => t("The oldest date of birth you wish to allow into the event."),
'#description' => t("The oldest date of birth you wish to allow into the event. Note that only the year is taken into account."),
'#default_value' => variable_get('booking_min_dob','1995-04-15 00:00:00'),
'#date_format' => 'd/m/Y',
'#date_label_position' => 'within',