minor tweaks
This commit is contained in:
@@ -260,10 +260,10 @@ function booking_emails_admin() {
|
||||
/**
|
||||
* Function to allow admin user to manually generate and send a workflow or custom email
|
||||
*
|
||||
* @param $input_option - A pre-defined string that selects the checkboxes for a corresponding class of people
|
||||
* @param
|
||||
* @return form render array
|
||||
*/
|
||||
function booking_manual_email_form($form, &$form_state, $input_option = "")
|
||||
function booking_manual_email_form($form, &$form_state)
|
||||
{
|
||||
global $event;
|
||||
//see http://www.jaypan.com/blog/themeing-drupal-7-forms-tables-checkboxes-or-radios
|
||||
@@ -284,7 +284,8 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
|
||||
$email_options_array['remindertravelrequired'] = 'Reminder Travel Form Required Email';
|
||||
$email_options_array['travelcomplete'] = 'Travel Form Complete Email';
|
||||
$preselection_options['---'] = "---";
|
||||
$preselection_options['bookedin'] = 'Status of Booked In';
|
||||
$preselection_options['bookedin'] = 'Status of Booked-in';
|
||||
$preselection_options['unpaid'] = 'Booked-in people with outstanding balance';
|
||||
$preselection_options['test'] = 'Testing';
|
||||
|
||||
$header = array(
|
||||
@@ -327,6 +328,11 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
|
||||
//attach js for dynamically setting checkboxes
|
||||
$form['#attached']['js'][] = drupal_get_path("module", "booking")."/booking.js";
|
||||
|
||||
$form['pretext'] = array(
|
||||
'#type' => 'container',
|
||||
'#children' => $prefix,
|
||||
);
|
||||
|
||||
//@todo add booking prefix
|
||||
$form['email-type'] = array(
|
||||
'#type' => 'select',
|
||||
@@ -436,15 +442,6 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
|
||||
}
|
||||
$options[$data->nid]['group_roles'] = $group_text;
|
||||
}
|
||||
/*
|
||||
//handle any checkbox pre-selection for this attendee
|
||||
if ($input_option == 'unpaid') {
|
||||
$values[$data->nid] = ($data->booking_payment_complete == 'Y' || $data->booking_status != 1) ? FALSE : TRUE;
|
||||
}
|
||||
elseif ($input_option == 'bookedin') {
|
||||
$values[$data->nid] = $data->booking_status == 1 ? TRUE : FALSE;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
$form['table'] = array (
|
||||
@@ -465,10 +462,12 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
|
||||
);
|
||||
|
||||
return array (
|
||||
/*
|
||||
'first_para' => array (
|
||||
'#type' => 'markup',
|
||||
'#markup' => $prefix,
|
||||
),
|
||||
*/
|
||||
'form' => $form,
|
||||
);
|
||||
}
|
||||
@@ -484,6 +483,7 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
|
||||
function _booking_email_get_default_selection_callback($form, $form_state) {
|
||||
global $event;
|
||||
$defaults = array();
|
||||
$prefix_text = $form_state['values']['pretext']; //
|
||||
$replacementform_data = array();
|
||||
|
||||
//get type of selection from $form_state['values']['booking-email-preselection']
|
||||
@@ -520,6 +520,7 @@ function _booking_email_get_default_selection_callback($form, $form_state) {
|
||||
'#suffix' => '</div>',
|
||||
'#attributes' => array('id' => 'booking_email_default_ids'),
|
||||
);
|
||||
|
||||
$output_html = render($replacementform_data['booking-email-default-ids']);
|
||||
//watchdog('booking_debug', "<pre>Manual Email ajax html\n@info</pre>", array('@info' => print_r( $output_html, true)));
|
||||
|
||||
|
@@ -322,17 +322,6 @@ function booking_menu() {
|
||||
'type' => MENU_NORMAL_ITEM,
|
||||
);
|
||||
|
||||
$items['admin/booking/manual-email/%'] = array(
|
||||
'title' => 'Manually Email People Test',
|
||||
'description' => 'Send manual email to registered people with preselected values',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('booking_manual_email_form', 3),
|
||||
//'page callback' => 'booking_manual_email',
|
||||
//'page arguments' => array(3),
|
||||
'access arguments' => array('access administration pages'),
|
||||
//'type' => MENU_NORMAL_ITEM,
|
||||
);
|
||||
|
||||
$items['admin/booking/manual-payments'] = array(
|
||||
'title' => 'Manual Payment Processing',
|
||||
'description' => 'Manually process peoples payments',
|
||||
|
Reference in New Issue
Block a user