From 2f91fef245c14a315e4a933a49c6dc566e0e703e Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Sat, 13 Jan 2018 13:32:59 +1100 Subject: [PATCH] cleanup of logic --- booking.regn_form.inc | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/booking.regn_form.inc b/booking.regn_form.inc index 5b0a755..bed8726 100644 --- a/booking.regn_form.inc +++ b/booking.regn_form.inc @@ -37,9 +37,8 @@ function booking_register_page() '#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( - '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()) { //too late to register @@ -64,7 +63,7 @@ function booking_register_page() 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; @@ -97,7 +96,6 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all $result = $price_query->execute(); //figure out if we're in the earlybird rate section and use that for determining pricing - // Registrations are open and before early bird closes $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 @@ -127,14 +125,6 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all 'Without this code, your registration will not be accepted.
' . '

NOTE: each early-access code can only be used once, so don\'t pass it along to your friends!


', ); - /* - $form['early-access']['booking_earlyaccess_explanation'] = array( - '#type' => 'container', - '#children' => t("

If you have been given an early-access code for registration, please enter it below. " . - "Without this code, your registration will not be accepted.

" . - "

NOTE: each early-access code can only be used once, so don't pass it along to your friends!

"), - ); - */ $form['early-access']['booking_earlyaccess_code'] = array( '#type' => 'textfield', '#title' => t('Unique Early-Access Code'),