tidy up and variety validation work

This commit is contained in:
Nathan Coad
2018-05-03 08:09:29 +10:00
parent 145e914f5e
commit 8b133cf160
7 changed files with 1008 additions and 845 deletions

View File

@@ -48,7 +48,7 @@ function booking_variety_session_callback($form, &$form_state) {
// --- Update the wrapper for available variety sessions ---
// Query the variety timeslot table
$timeslot_query = db_select('booking_variety_times', 'v');
$timeslot_query = db_select('booking_variety_timeslots', 'v');
$timeslot_query->condition('v.booking_eventid', $event->eid, '=')
->fields('v')
->orderBy('v.booking_variety_start');
@@ -81,7 +81,7 @@ function booking_variety_session_callback($form, &$form_state) {
//$form['variety-sessions'][$fieldname]['#title'] = t('Rebuilt Variety Session: ' . $timeslot->booking_variety_time_descrip);
// Tell drupal to update the wrapper for this field
$commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . '_wrapper', drupal_render($form['variety-sessions'][$fieldname]));
$commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . '_wrapper', drupal_render($form['form']['variety-sessions'][$fieldname]));
//$commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . '_wrapper', drupal_render($form));
}