change link tokens to href if html email enabled
This commit is contained in:
@@ -11,7 +11,7 @@ function _booking_generate_html_body($subject, $body, $tokens) {
|
||||
$output_text = "";
|
||||
|
||||
//Check if we should apply a HTML theme to the email text or just send a normal email
|
||||
if(variable_get('booking_enable_html_mail', 0) == 1) {
|
||||
if (variable_get('booking_enable_html_mail', 0) == 1) {
|
||||
//get the footer text
|
||||
$message_footer = variable_get('booking_html_mail_footer');
|
||||
$message_footer = isset($message_footer['format']) ? $message_footer['value'] : $message_footer;
|
||||
|
@@ -197,6 +197,7 @@ function _booking_studygroups_name_autocomplete($string) {
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
global $event;
|
||||
|
@@ -618,10 +618,21 @@ function booking_define_personspecific_tokens($node)
|
||||
$tokens['refund-due'] = $node->booking_refund_due;
|
||||
$tokens['waitinglist-position'] = $result->num_ppl - variable_get('booking_regn_limit',350) + 1;
|
||||
$tokens['payment-transaction-desc'] = $node->nid . ' ' . $node->booking_lastname;
|
||||
$tokens['balance-payment-link'] = url('balance/' . $tempid, array('absolute' => TRUE));
|
||||
$tokens['confirm-payment-link'] = url('confirm/' . $tempid, array('absolute' => TRUE));
|
||||
$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['confirm-payment-link'] = url('confirm/' . $tempid, array('absolute' => TRUE));
|
||||
}
|
||||
|
||||
|
||||
//if payment processor is set to manual then don't populate these tokens
|
||||
//if paypal is enabled
|
||||
if ($payment_processor_type == 0) {
|
||||
@@ -641,9 +652,17 @@ function booking_define_personspecific_tokens($node)
|
||||
}
|
||||
//if travelform is enabled
|
||||
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);
|
||||
// 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 {
|
||||
$tokens['travel-link'] = "";
|
||||
$tokens['travel-summary'] = "";
|
||||
|
Reference in New Issue
Block a user