change link tokens to href if html email enabled
This commit is contained in:
@@ -197,6 +197,7 @@ function _booking_studygroups_name_autocomplete($string) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to allow admin to edit leaders and helpers for a study group
|
* Function to allow admin to edit leaders and helpers for a study group
|
||||||
|
* Not sure where the original idea came from but https://knackforge.com/blog/selvam/drupal-7-creating-editable-table-form-api is similar
|
||||||
*/
|
*/
|
||||||
function booking_studygroup_leadhelp_edit_form($node, &$form_state, $group_id) {
|
function booking_studygroup_leadhelp_edit_form($node, &$form_state, $group_id) {
|
||||||
global $event;
|
global $event;
|
||||||
|
@@ -618,9 +618,20 @@ function booking_define_personspecific_tokens($node)
|
|||||||
$tokens['refund-due'] = $node->booking_refund_due;
|
$tokens['refund-due'] = $node->booking_refund_due;
|
||||||
$tokens['waitinglist-position'] = $result->num_ppl - variable_get('booking_regn_limit',350) + 1;
|
$tokens['waitinglist-position'] = $result->num_ppl - variable_get('booking_regn_limit',350) + 1;
|
||||||
$tokens['payment-transaction-desc'] = $node->nid . ' ' . $node->booking_lastname;
|
$tokens['payment-transaction-desc'] = $node->nid . ' ' . $node->booking_lastname;
|
||||||
|
$tokens['regn-summary'] = _booking_details_email_summary($node);
|
||||||
|
|
||||||
|
// convert the URL into a href if html emails are enabled
|
||||||
|
if (variable_get('booking_enable_html_mail', 0) == 1) {
|
||||||
|
$balance_link = url('balance/' . $tempid, array('absolute' => TRUE));
|
||||||
|
$confirm_link = url('confirm/' . $tempid, array('absolute' => TRUE));
|
||||||
|
$tokens['balance-payment-link'] = t('<a href="!link">!link</a>', $balance_link);
|
||||||
|
$tokens['confirm-payment-link'] = t('<a href="!link">!link</a>', $confirm_link);
|
||||||
|
}
|
||||||
|
else {
|
||||||
$tokens['balance-payment-link'] = url('balance/' . $tempid, array('absolute' => TRUE));
|
$tokens['balance-payment-link'] = url('balance/' . $tempid, array('absolute' => TRUE));
|
||||||
$tokens['confirm-payment-link'] = url('confirm/' . $tempid, array('absolute' => TRUE));
|
$tokens['confirm-payment-link'] = url('confirm/' . $tempid, array('absolute' => TRUE));
|
||||||
$tokens['regn-summary'] = _booking_details_email_summary($node);
|
}
|
||||||
|
|
||||||
|
|
||||||
//if payment processor is set to manual then don't populate these tokens
|
//if payment processor is set to manual then don't populate these tokens
|
||||||
//if paypal is enabled
|
//if paypal is enabled
|
||||||
@@ -641,9 +652,17 @@ function booking_define_personspecific_tokens($node)
|
|||||||
}
|
}
|
||||||
//if travelform is enabled
|
//if travelform is enabled
|
||||||
if (variable_get('booking_enable_travelform', 0) == 1) {
|
if (variable_get('booking_enable_travelform', 0) == 1) {
|
||||||
$tokens['travel-link'] = url('travel/' . $tempid, array('absolute' => TRUE));
|
|
||||||
$tokens['travel-summary'] = _booking_travelform_email_summary($node);
|
$tokens['travel-summary'] = _booking_travelform_email_summary($node);
|
||||||
|
// convert the URL into a href if html emails are enabled
|
||||||
|
if (variable_get('booking_enable_html_mail', 0) == 1) {
|
||||||
|
$travel_link = url('travel/' . $tempid, array('absolute' => TRUE));
|
||||||
|
$tokens['travel-link'] = t('<a href="!link">!link</a>', $travel_link);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$tokens['travel-link'] = url('travel/' . $tempid, array('absolute' => TRUE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// travel form not enabled
|
||||||
else {
|
else {
|
||||||
$tokens['travel-link'] = "";
|
$tokens['travel-link'] = "";
|
||||||
$tokens['travel-summary'] = "";
|
$tokens['travel-summary'] = "";
|
||||||
|
Reference in New Issue
Block a user