Medical conditions section on regn form is now more flexible
This commit is contained in:
@@ -332,7 +332,7 @@ function booking_admin() {
|
||||
'#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.
|
||||
// Only show this field when the 'booking_enable_helpareas' radio option is set to true
|
||||
'visible' => array(
|
||||
':input[name="booking_enable_helpareas"]' => array('value' => 1),
|
||||
),
|
||||
@@ -353,20 +353,47 @@ function booking_admin() {
|
||||
'#default_value' => variable_get('booking_enable_roommate', 0),
|
||||
);
|
||||
$form['regn_options']['booking_enable_dietary'] = array (
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Allow attendee to specify dietary requirements?'),
|
||||
'#description' => t('If set to No, the following text definition will be used instead.'),
|
||||
'#options' => array (0 => t('No'), t('Yes')),
|
||||
'#default_value' => variable_get('booking_enable_dietary', 0),
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Allow attendee to specify dietary requirements?'),
|
||||
'#description' => t('If set to No, the following text definition will be used instead.'),
|
||||
'#options' => array (0 => t('No'), 1 => t('Yes')),
|
||||
'#default_value' => variable_get('booking_enable_dietary', 0),
|
||||
);
|
||||
$form['regn_options']['booking_dietary_text_definition'] = array (
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Dietary Requirements Text Definition'),
|
||||
'#default_value' => variable_get('booking_dietary_text_definition', 'Please use the contact us form to indicate what dietary requirements you have.'),
|
||||
'#description' => 'Text to use on registration form if attendee may not specify dietary requirements (as above).',
|
||||
'#size' => 150,
|
||||
'#maxlength' => 2000,
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Dietary Requirements Text Definition'),
|
||||
'#default_value' => variable_get('booking_dietary_text_definition', 'Please use the contact us form to indicate what dietary requirements you have.'),
|
||||
'#description' => 'Text to use on registration form if attendee may not specify dietary requirements.',
|
||||
'#size' => 150,
|
||||
'#maxlength' => 2000,
|
||||
'#states' => array(
|
||||
// Only show this field when the 'booking_enable_dietary' radio option is set to No
|
||||
'visible' => array(
|
||||
':input[name="booking_enable_dietary"]' => array('value' => 0),
|
||||
),
|
||||
),
|
||||
);
|
||||
$form['regn_options']['booking_enable_medcond'] = array (
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Allow attendee to specify medical conditions?'),
|
||||
'#description' => t('If set to No, the following text definition will be used instead.'),
|
||||
'#options' => array (0 => t('No'), 1 => t('Yes')),
|
||||
'#default_value' => variable_get('booking_enable_medcond', 0),
|
||||
);
|
||||
$form['regn_options']['booking_medcond_text_definition'] = array (
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Medical Condition Text Definition'),
|
||||
'#default_value' => variable_get('booking_medcond_text_definition', 'Please use the contact us form to indicate what medical condition you have.'),
|
||||
'#description' => 'Text to use on registration form if attendee may not specify a medical condition.',
|
||||
'#size' => 150,
|
||||
'#maxlength' => 2000,
|
||||
'#states' => array(
|
||||
// Only show this field when the 'booking_enable_medcond' radio option is set to No
|
||||
'visible' => array(
|
||||
':input[name="booking_enable_medcond"]' => array('value' => 0),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$form['management'] = array (
|
||||
'#type' => 'fieldset',
|
||||
|
Reference in New Issue
Block a user