add postive feedback

This commit is contained in:
2017-08-26 19:03:11 +10:00
parent 3a150be2f3
commit 99fa4d4584

View File

@@ -955,10 +955,14 @@ function booking_earlyaccess_feedback_callback($form, &$form_state) {
':eid' => $event->eid,
)
)->fetchObject();
//see if we got a result
//no matching code found so return an error
if (! $code_check) {
return '<div id="booking-earlyaccess-feedback-wrapper"><span color="#8c2e0b">You have entered an invalid early registration code. If you do not have a code, please wait until normal registrations open.</span></div>';
}
//matched a code so let the user know everything is fine
else {
return '<div id="booking-earlyaccess-feedback-wrapper"><span color="#234600">Your early registration code has been validated.</span></div>';
}
}
else {
return '<div id="booking-earlyaccess-feedback-wrapper"><span color="#8c2e0b">You must enter an early access code to register now. If you do not have a code, please wait until normal registrations open.</span></div>';