actual cleanup

This commit is contained in:
Nathan Coad
2018-05-03 10:13:15 +10:00
parent 7f8c3386b6
commit 59d04fea5d

View File

@@ -52,15 +52,6 @@ function booking_variety_regn_form($node, &$form_state)
foreach($result as $timeslot) { foreach($result as $timeslot) {
$fieldname = 'select-variety-' . $timeslot->tid; $fieldname = 'select-variety-' . $timeslot->tid;
// Make sure we get rid of any stale data
/*
if (isset($form_state['input']['variety-sessions'][$fieldname])) {
watchdog('booking_debug', 'Unsetting stale @name data, was: <pre>@info</pre>',
array('@name' => $fieldname, '@info' => print_r($form_state['input'], true)));
unset($form_state['input']['variety-sessions'][$fieldname]);
}
*/
//create the form element for this timeslot //create the form element for this timeslot
$form['variety-sessions'][$fieldname] = array( $form['variety-sessions'][$fieldname] = array(
'#type' => 'select', '#type' => 'select',
@@ -68,8 +59,8 @@ function booking_variety_regn_form($node, &$form_state)
'#required' => TRUE, '#required' => TRUE,
'#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 0, '#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 0,
'#options' => _booking_get_variety_timeslot_options($timeslot->tid), '#options' => _booking_get_variety_timeslot_options($timeslot->tid),
'#prefix' => '<div id="booking_variety_session_' . $timeslot->tid . '_wrapper">', //'#prefix' => '<div id="booking_variety_session_' . $timeslot->tid . '_wrapper">',
'#suffix' => '</div>', //'#suffix' => '</div>',
); );
} }