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

View File

@@ -6,11 +6,13 @@
* NOTE: This feature is not complete * NOTE: This feature is not complete
*/ */
/**
* Build the user-facing variety session registration form
*/
function booking_variety_regn_form($node, &$form_state) function booking_variety_regn_form($node, &$form_state)
{ {
global $event; global $event;
$form = array (); $form = array();
$data = $node; $data = $node;
// Query the variety timeslot table // Query the variety timeslot table
@@ -20,9 +22,6 @@ function booking_variety_regn_form($node, &$form_state)
->orderBy('v.booking_variety_start'); ->orderBy('v.booking_variety_start');
$result = $timeslot_query->execute(); $result = $timeslot_query->execute();
//$form['#prefix'] = '<div id="booking_variety_session_form_wrapper">';
//$form['#suffix'] = '</div>';
$form['identity'] = array( $form['identity'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
'#title' => 'Select Person', '#title' => 'Select Person',
@@ -118,7 +117,7 @@ function booking_variety_session_form_callback($form, &$form_state) {
} }
/** /**
* Validate the submission * Validate the submission for the user-facing variety session registration form
*/ */
function booking_variety_regn_form_validate($form, &$form_state) { function booking_variety_regn_form_validate($form, &$form_state) {
global $event; global $event;
@@ -159,7 +158,7 @@ function booking_variety_regn_form_validate($form, &$form_state) {
array(':nid' => $values['booking_nid'])); array(':nid' => $values['booking_nid']));
if ($query_already_registered) { if ($query_already_registered) {
form_set_error('booking_nid', t('You have already registered for variety sessions.')); form_set_error('booking_nid', t('You have already registered for variety sessions. Existing registration cannot be changed.'));
} }
// --- Check there is still space available in the selected variety sessions --- // --- Check there is still space available in the selected variety sessions ---
@@ -198,7 +197,7 @@ function booking_variety_regn_form_validate($form, &$form_state) {
} }
/** /**
* Process the submission * Process the submission for the user-facing variety session registration form
*/ */
function booking_variety_regn_form_submit($form, &$form_state) { function booking_variety_regn_form_submit($form, &$form_state) {
global $event; global $event;