make song choice configurable option
This commit is contained in:
@@ -565,6 +565,16 @@ function booking_admin() {
|
|||||||
),
|
),
|
||||||
'#default_value' => variable_get('booking_enable_roommate', 0)
|
'#default_value' => variable_get('booking_enable_roommate', 0)
|
||||||
);
|
);
|
||||||
|
$form['regn_options']['booking_enable_songchoice'] = array(
|
||||||
|
'#type' => 'radios',
|
||||||
|
'#title' => t('Enable attendee to specify song choice?'),
|
||||||
|
'#description' => t('Select whether to include questions about song choice in the booking form.'),
|
||||||
|
'#options' => array(
|
||||||
|
0 => t('No'),
|
||||||
|
t('Yes')
|
||||||
|
),
|
||||||
|
'#default_value' => variable_get('booking_enable_songchoice', 0)
|
||||||
|
);
|
||||||
$form['regn_options']['booking_enable_dietary'] = array(
|
$form['regn_options']['booking_enable_dietary'] = array(
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#title' => t('Allow attendee to specify dietary requirements?'),
|
'#title' => t('Allow attendee to specify dietary requirements?'),
|
||||||
|
@@ -911,6 +911,7 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all
|
|||||||
'#default_value' => !empty($data->booking_random_facts) ? $data->booking_random_facts : ''
|
'#default_value' => !empty($data->booking_random_facts) ? $data->booking_random_facts : ''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (variable_get('booking_enable_songchoice', 0) == 1) {
|
||||||
$form['misc-areas']['booking_song_choice'] = array(
|
$form['misc-areas']['booking_song_choice'] = array(
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t("Let us know if there's a song you'd love to sing during the week."),
|
'#title' => t("Let us know if there's a song you'd love to sing during the week."),
|
||||||
@@ -918,6 +919,7 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all
|
|||||||
'#required' => FALSE,
|
'#required' => FALSE,
|
||||||
'#default_value' => !empty($data->booking_song_choice) ? $data->booking_song_choice : ''
|
'#default_value' => !empty($data->booking_song_choice) ? $data->booking_song_choice : ''
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($inserting == TRUE) {
|
if ($inserting == TRUE) {
|
||||||
$form['submit'] = array(
|
$form['submit'] = array(
|
||||||
|
Reference in New Issue
Block a user