cleanup of logic
This commit is contained in:
@@ -37,9 +37,8 @@ function booking_register_page()
|
|||||||
'#markup' => $output
|
'#markup' => $output
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
//even if we are allowed to show the early access code, only show it if it is prior to the normal registration opening time
|
|
||||||
$return_array[] = array(
|
$return_array[] = array(
|
||||||
'form' => drupal_get_form('booking_form', true, $before_regn_open_check)
|
'form' => drupal_get_form('booking_form', true)
|
||||||
);
|
);
|
||||||
} elseif ($booking_times->booking_register_close < time()) {
|
} elseif ($booking_times->booking_register_close < time()) {
|
||||||
//too late to register
|
//too late to register
|
||||||
@@ -64,7 +63,7 @@ function booking_register_page()
|
|||||||
return $return_array;
|
return $return_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
function booking_form($node, &$form_state, $inserting = FALSE, $early_access_allowed = FALSE)
|
function booking_form($node, &$form_state, $inserting = FALSE)
|
||||||
{
|
{
|
||||||
|
|
||||||
global $event;
|
global $event;
|
||||||
@@ -97,7 +96,6 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all
|
|||||||
$result = $price_query->execute();
|
$result = $price_query->execute();
|
||||||
|
|
||||||
//figure out if we're in the earlybird rate section and use that for determining pricing
|
//figure out if we're in the earlybird rate section and use that for determining pricing
|
||||||
|
|
||||||
// Registrations are open and before early bird closes
|
// Registrations are open and before early bird closes
|
||||||
$earlybird_check = (($event->booking_register_open <= time()) && ($event->booking_earlybird_close > time()));
|
$earlybird_check = (($event->booking_register_open <= time()) && ($event->booking_earlybird_close > time()));
|
||||||
// Early access is allowed and the time now is before registrations would normally open
|
// Early access is allowed and the time now is before registrations would normally open
|
||||||
@@ -127,14 +125,6 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all
|
|||||||
'Without this code, your registration will not be accepted.<br />' .
|
'Without this code, your registration will not be accepted.<br />' .
|
||||||
'<p><strong>NOTE: each early-access code can only be used once, so don\'t pass it along to your friends!</strong></p></div><br />',
|
'<p><strong>NOTE: each early-access code can only be used once, so don\'t pass it along to your friends!</strong></p></div><br />',
|
||||||
);
|
);
|
||||||
/*
|
|
||||||
$form['early-access']['booking_earlyaccess_explanation'] = array(
|
|
||||||
'#type' => 'container',
|
|
||||||
'#children' => t("<p>If you have been given an early-access code for registration, please enter it below. " .
|
|
||||||
"Without this code, your registration will not be accepted.</p>" .
|
|
||||||
"<p><strong>NOTE: each early-access code can only be used once, so don't pass it along to your friends!</strong></p>"),
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
$form['early-access']['booking_earlyaccess_code'] = array(
|
$form['early-access']['booking_earlyaccess_code'] = array(
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t('Unique Early-Access Code'),
|
'#title' => t('Unique Early-Access Code'),
|
||||||
|
Reference in New Issue
Block a user