make songchoice and freestyle text configurable
This commit is contained in:
@@ -938,20 +938,22 @@ function booking_form($node, &$form_state, $inserting = FALSE)
|
||||
);
|
||||
*/
|
||||
if (variable_get('booking_enable_songchoice', 0) == 1) {
|
||||
$songchoice_required_check = (variable_get('booking_require_songchoice', 1) == 1) && $inserting;
|
||||
$form['misc-areas']['booking_song_choice'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t("Let us know if there's a song you'd love to sing during the week"),
|
||||
'#maxlength' => 200,
|
||||
'#required' => TRUE,
|
||||
'#required' => $songchoice_required_check,
|
||||
'#default_value' => !empty($data->booking_song_choice) ? $data->booking_song_choice : ''
|
||||
);
|
||||
}
|
||||
if (variable_get('booking_enable_freestyle', 0) == 1) {
|
||||
$freestyle_required_check = (variable_get('booking_require_freestyle', 1) == 1) && $inserting;
|
||||
$form['misc-areas']['booking_freestyle_text'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t("Freestyle (optional)"),
|
||||
'#maxlength' => 500,
|
||||
'#required' => FALSE,
|
||||
'#required' => $freestyle_required_check,
|
||||
'#default_value' => !empty($data->booking_freestyle_text) ? $data->booking_freestyle_text : ''
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user