minor tweaks

This commit is contained in:
2016-06-01 19:11:10 +10:00
parent 3f5f80c308
commit a01096d1a5
3 changed files with 14 additions and 3 deletions

View File

@@ -1103,8 +1103,7 @@ function _booking_postpayment_trigger($nid, $person, $balance_payment)
//If there is no outstanding balance, send a payment complete email
$amount_owing = _booking_amount_owing($person);
//if ($total >= $person->booking_total_pay_reqd)
if ($amount_owing == 0)
{
if ($amount_owing == 0) {
//set the payment complete flag
db_update('booking_person')
->fields(array(

View File

@@ -535,6 +535,9 @@ function booking_update_7232() {
* Implementation of hook_install().
*/
function booking_install() {
//create the sql view we use
_booking_node_create_mysqlview();
// Create some sample data
// TODO: Set default values for the config pages too
$result = db_insert('booking_price')

View File

@@ -72,13 +72,15 @@ function booking_travel_page()
'form' => drupal_get_form('travel_form', true, $node->nid)
);
//text after form
/*
$afterform_text = variable_get('booking_travelform_page_post_text');
$return_array[] = array(
'paragraph' => array(
'#type' => 'markup',
'#markup' => token_replace($afterform_text['value'], $tokens),
)
);
);
*/
}
return $return_array;
@@ -332,6 +334,13 @@ function travel_form($node, &$form_state, $inserting = FALSE, $nid = 0)
}
if ($inserting == TRUE) {
//add some html just before the submit button
$afterform_text = variable_get('booking_travelform_page_post_text');
$form['post-text'] = array(
'#type' => 'container',
'#children' => token_replace($afterform_text['value'], $tokens),
);
//include the submit button
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit')