minor tweaks
This commit is contained in:
@@ -1103,8 +1103,7 @@ function _booking_postpayment_trigger($nid, $person, $balance_payment)
|
|||||||
//If there is no outstanding balance, send a payment complete email
|
//If there is no outstanding balance, send a payment complete email
|
||||||
$amount_owing = _booking_amount_owing($person);
|
$amount_owing = _booking_amount_owing($person);
|
||||||
//if ($total >= $person->booking_total_pay_reqd)
|
//if ($total >= $person->booking_total_pay_reqd)
|
||||||
if ($amount_owing == 0)
|
if ($amount_owing == 0) {
|
||||||
{
|
|
||||||
//set the payment complete flag
|
//set the payment complete flag
|
||||||
db_update('booking_person')
|
db_update('booking_person')
|
||||||
->fields(array(
|
->fields(array(
|
||||||
|
@@ -535,6 +535,9 @@ function booking_update_7232() {
|
|||||||
* Implementation of hook_install().
|
* Implementation of hook_install().
|
||||||
*/
|
*/
|
||||||
function booking_install() {
|
function booking_install() {
|
||||||
|
//create the sql view we use
|
||||||
|
_booking_node_create_mysqlview();
|
||||||
|
|
||||||
// Create some sample data
|
// Create some sample data
|
||||||
// TODO: Set default values for the config pages too
|
// TODO: Set default values for the config pages too
|
||||||
$result = db_insert('booking_price')
|
$result = db_insert('booking_price')
|
||||||
|
@@ -72,13 +72,15 @@ function booking_travel_page()
|
|||||||
'form' => drupal_get_form('travel_form', true, $node->nid)
|
'form' => drupal_get_form('travel_form', true, $node->nid)
|
||||||
);
|
);
|
||||||
//text after form
|
//text after form
|
||||||
|
/*
|
||||||
$afterform_text = variable_get('booking_travelform_page_post_text');
|
$afterform_text = variable_get('booking_travelform_page_post_text');
|
||||||
$return_array[] = array(
|
$return_array[] = array(
|
||||||
'paragraph' => array(
|
'paragraph' => array(
|
||||||
'#type' => 'markup',
|
'#type' => 'markup',
|
||||||
'#markup' => token_replace($afterform_text['value'], $tokens),
|
'#markup' => token_replace($afterform_text['value'], $tokens),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return_array;
|
return $return_array;
|
||||||
@@ -332,6 +334,13 @@ function travel_form($node, &$form_state, $inserting = FALSE, $nid = 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($inserting == TRUE) {
|
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(
|
$form['submit'] = array(
|
||||||
'#type' => 'submit',
|
'#type' => 'submit',
|
||||||
'#value' => t('Submit')
|
'#value' => t('Submit')
|
||||||
|
Reference in New Issue
Block a user