Add ability for admin to choose help areas via gui, enhance medical condition field in regn form

This commit is contained in:
2015-07-23 18:49:18 +10:00
parent 7f5237a195
commit c8d91ea5c6
4 changed files with 110 additions and 12 deletions

View File

@@ -321,9 +321,23 @@ function booking_admin() {
'#type' => 'radios',
'#title' => t('Enable help area questions?'),
'#description' => t('Select whether to include questions about areas people are willing to help with in the booking form.'),
'#options' => array (0 => t('No'), t('Yes')),
'#options' => array (0 => t('No'), 1 => t('Yes')),
'#default_value' => variable_get('booking_enable_helpareas', 0),
);
$form['regn_options']['booking_enabled_helparea_options'] = array (
'#type' => 'select',
'#multiple' => TRUE,
'#title' => t('Select help areas to enable'),
'#description' => t('Select which questions to include in the booking form.'),
'#options' => _booking_get_help_areas(),
'#default_value' => variable_get('booking_enabled_helparea_options', ''),
'#states' => array(
// Only show this field when the 'booking_enable_helpareas' checkbox is enabled.
'visible' => array(
':input[name="booking_enable_helpareas"]' => array('value' => 1),
),
),
);
$form['regn_options']['booking_enable_skills'] = array (
'#type' => 'radios',
'#title' => t('Enable special skills information?'),