try hard coding preselection types for manual email form

This commit is contained in:
2016-05-26 22:13:08 +10:00
parent 7beffef6a9
commit 5427bd6020
2 changed files with 14 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
<?php <?php
function booking_manual_email() function booking_manual_email($preselected = NULL)
{ {
global $event; global $event;
//see http://www.jaypan.com/blog/themeing-drupal-7-forms-tables-checkboxes-or-radios //see http://www.jaypan.com/blog/themeing-drupal-7-forms-tables-checkboxes-or-radios
@@ -93,8 +93,6 @@ function booking_manual_email()
{ {
$group_text = ""; $group_text = "";
$class = $data->booking_welfare_required == 'Y' ? "welfare-row" : "normal-row"; $class = $data->booking_welfare_required == 'Y' ? "welfare-row" : "normal-row";
//$paid = _booking_amount_owing($data);
//$paid = _booking_amount_owing($data->nid);
$options[$data->nid] = array ( $options[$data->nid] = array (
'booking_nid' => l(t('!id', array('!id' => $data->nid)), t('node/!id', array('!id' => $data->nid))), 'booking_nid' => l(t('!id', array('!id' => $data->nid)), t('node/!id', array('!id' => $data->nid))),
'booking_name' => $data->booking_firstname . " " . $data->booking_lastname, 'booking_name' => $data->booking_firstname . " " . $data->booking_lastname,
@@ -119,9 +117,11 @@ function booking_manual_email()
} }
} }
$options[$data->nid]['group_roles'] = $group_text; $options[$data->nid]['group_roles'] = $group_text;
} }
//$values[$data->nid] = ($data->booking_payment_complete == 'Y' || $data->booking_status != 1) ? FALSE : TRUE; if ($preselected == 'unpaid') {
$values[$data->nid] = ($data->booking_payment_complete == 'Y' || $data->booking_status != 1) ? FALSE : TRUE;
}
} }
$form['table'] = array ( $form['table'] = array (

View File

@@ -296,6 +296,15 @@ function booking_menu() {
'type' => MENU_NORMAL_ITEM, 'type' => MENU_NORMAL_ITEM,
); );
$items['admin/booking/manual-email/%'] = array(
'title' => 'Manually Email People',
'description' => 'Send manual email to registered people with preselected values',
'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( $items['admin/booking/manual-payments'] = array(
'title' => 'Manual Payment Processing', 'title' => 'Manual Payment Processing',
'description' => 'Manually process peoples payments', 'description' => 'Manually process peoples payments',