Configuration option for enabling dietary requirement specification
This commit is contained in:
@@ -647,30 +647,33 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
||||
'#default_value' => (!empty($data->booking_dietary) && $data->booking_dietary == 'Y') ? 1 : 0
|
||||
);
|
||||
|
||||
/*
|
||||
$form['misc-areas']['booking_dietary'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Please describe your dietary requirements.'),
|
||||
'#maxlength' => 120,
|
||||
'#required' => FALSE,
|
||||
'#states' => array(
|
||||
'visible' => array(
|
||||
':input[name="booking_dietary_check"]' => array('checked' => TRUE),
|
||||
if (variable_get('booking_enable_dietary', 0) == 1)
|
||||
{
|
||||
$form['misc-areas']['booking_dietary'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Please describe your dietary requirements.'),
|
||||
'#maxlength' => 120,
|
||||
'#required' => FALSE,
|
||||
'#states' => array(
|
||||
'visible' => array(
|
||||
':input[name="booking_dietary_check"]' => array('checked' => TRUE),
|
||||
),
|
||||
),
|
||||
),
|
||||
'#default_value' => !empty($data->booking_dietary) ? $data->booking_dietary : ''
|
||||
);
|
||||
*/
|
||||
|
||||
$form['misc-areas']['booking_dietary'] = array(
|
||||
'#type' => 'container',
|
||||
'#children' => t('Please send an email to bookings@studyweek.net describing your dietary requirements.'),
|
||||
'#states' => array(
|
||||
'visible' => array(
|
||||
':input[name="booking_dietary_check"]' => array('checked' => TRUE),
|
||||
'#default_value' => !empty($data->booking_dietary) ? $data->booking_dietary : ''
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form['misc-areas']['booking_dietary'] = array(
|
||||
'#type' => 'container',
|
||||
'#children' => variable_get('booking_dietary_text_definition', "Please contact us to specify your dietary requirements."),
|
||||
'#states' => array(
|
||||
'visible' => array(
|
||||
':input[name="booking_dietary_check"]' => array('checked' => TRUE),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$form['misc-areas']['booking_medical_conditions_check'] = array(
|
||||
|
Reference in New Issue
Block a user