Finally add a customisable page for /bookingfinal

This commit is contained in:
2015-03-09 17:02:38 +11:00
parent c3e33db5ba
commit 98c4176337
5 changed files with 55 additions and 15 deletions

View File

@@ -151,7 +151,13 @@ function booking_admin() {
'#maxlength' => 3,
'#default_value' => variable_get('booking_readinggroup_id','0'),
);
$form['features']['booking_enable_variety_sessions'] = array (
'#type' => 'radios',
'#title' => t('Enable variety session form?'),
'#description' => t('Note that this feature is still under development and cannot yet be used.'),
'#options' => array (0 => t('No'), t('Yes')),
'#default_value' => variable_get('booking_enable_variety_sessions', 0),
);
$form['features']['booking_publish_readinggroups'] = array (
'#type' => 'radios',
@@ -174,11 +180,11 @@ function booking_admin() {
'#default_value' => variable_get('booking_auto_confirm_email', 0),
);
$form['misc']['booking_auto_workflow_email'] = array (
'#type' => 'radios',
'#title' => t('Automatic Workflow Email'),
'#description' => t('Automatically send workflow emails such as status changes, travel details received, etc'),
'#options' => array (0 => t('No'), t('Yes')),
'#default_value' => variable_get('booking_auto_workflow_email', 0),
'#type' => 'radios',
'#title' => t('Send An Automatic Workflow Email?'),
'#description' => t('Automatically send workflow emails to attendee on events such as status changes, travel details received, etc'),
'#options' => array (0 => t('No'), t('Yes')),
'#default_value' => variable_get('booking_auto_workflow_email', 0),
);
$form['misc']['booking_auto_show_on_lists'] = array (
'#type' => 'radios',

View File

@@ -233,6 +233,12 @@ function booking_menu() {
'access arguments' => array('access booking form'),
'type' => MENU_NORMAL_ITEM,
);
$items['bookingfinal'] = array(
'title' => $bookingTitle . ' Registration Completed',
'page callback' => 'booking_payment_completed_page',
'access arguments' => array('access booking form'),
'type' => MENU_NORMAL_ITEM,
);
$items['confirm/%'] = array(
'title' => 'Booking Payment',
'page callback' => 'booking_confirm_page',
@@ -265,13 +271,16 @@ function booking_menu() {
'type' => MENU_SUGGESTED_ITEM,
);
$items['variety'] = array(
'title' => $bookingTitle . ' Variety Sessions',
'page callback' => 'drupal_get_form',
'page arguments' => array('booking_variety_regn_form'),
'access arguments' => array('access booking form'),
'type' => MENU_NORMAL_ITEM,
);
if (variable_get('booking_enable_variety_sessions', 0) == 1)
{
$items['variety'] = array(
'title' => $bookingTitle . ' Variety Sessions',
'page callback' => 'drupal_get_form',
'page arguments' => array('booking_variety_regn_form'),
'access arguments' => array('access booking form'),
'type' => MENU_NORMAL_ITEM,
);
}
//Various reports
$items['admin/booking/summary'] = array(

View File

@@ -50,6 +50,26 @@ function booking_register_page() {
return $return_array;
}
/**
* Landing page after returning from paypal
*/
function booking_payment_completed_page() {
//get some configuration information
global $event;
$output = "";
$return_array = array();
//set the page title
$bookingTitle = !empty($event->booking_eventname) ? $event->booking_eventname : 'Event';
drupal_set_title($bookingTitle . ' Registration Completed');
$output = token_replace(variable_get('booking_regn_completed_page'), booking_define_tokens());
$return_array[] = array('paragraph' => array('#type' => 'markup', '#markup' => $output));
return $return_array;
}
function booking_form($node, &$form_state, $inserting = FALSE) {
global $event;

View File

@@ -53,7 +53,7 @@ function booking_report_summary() {
$header[] = array('data' => t('Email'), 'field' => 'booking_email');
$header[] = array('data' => t('Payment To Date'), 'field' => 'booking_amount_paid');
$header[] = array('data' => t('Total Payment Required'));
$header[] = array('data' => t('Fully paid?'));
$header[] = array('data' => t('Fully paid?'), 'field' => 'booking_payment_complete');
$header[] = array('data' => t('Refund Processed?'), 'field' => 'booking_refund_processed');
$header[] = array('data' => t('Refund Due'), 'field' => 'booking_refund_due');
$header[] = array('data' => t('Welfare Required?'), 'field' => 'booking_welfare_required');

View File

@@ -193,7 +193,12 @@ $booking_registration_intro_text = variable_get('booking_registration_intro_text
'#description' => t(''),
'#default_value' => variable_get('booking_regn_confirm_married_text', $booking_regn_confirm_married_text),
);
$form['confirmation']['booking_regn_completed_page'] = array(
'#title' => t('Text to use for landing page on return from paypal website'),
'#type' => 'textarea',
'#description' => t(''),
'#default_value' => variable_get('booking_regn_completed_page', ''),
);
/*Text for the balance payment page*/
$form['balance'] = array(
'#type' => 'fieldset',