mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for payment buttons in HTML emails
This commit is contained in:
parent
bbbf1237c5
commit
0731165d8f
@ -4,6 +4,7 @@ use Form;
|
||||
use HTML;
|
||||
use Utils;
|
||||
use App\Models\Gateway;
|
||||
use App\Models\GatewayType;
|
||||
|
||||
class TemplateService
|
||||
{
|
||||
@ -69,7 +70,10 @@ class TemplateService
|
||||
|
||||
// Add variables for available payment types
|
||||
foreach (Gateway::$gatewayTypes as $type) {
|
||||
$camelType = Utils::toCamelCase($type);
|
||||
if ($type == GATEWAY_TYPE_TOKEN) {
|
||||
continue;
|
||||
}
|
||||
$camelType = Utils::toCamelCase(GatewayType::getAliasFromId($type));
|
||||
$variables["\${$camelType}Link"] = $invitation->getLink('payment') . "/{$type}";
|
||||
$variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
|
||||
}
|
||||
|
@ -299,11 +299,13 @@
|
||||
|
||||
// Add any available payment method links
|
||||
@foreach (\App\Models\Gateway::$gatewayTypes as $type)
|
||||
{!! "keys.push('" . Utils::toCamelCase($type).'Link' . "');" !!}
|
||||
@if ($type != GATEWAY_TYPE_TOKEN)
|
||||
{!! "keys.push('" . Utils::toCamelCase(\App\Models\GatewayType::getAliasFromId($type)).'Link' . "');" !!}
|
||||
{!! "vals.push('" . URL::to('/payment/...') . "');" !!}
|
||||
|
||||
{!! "keys.push('" . Utils::toCamelCase($type).'Button' . "');" !!}
|
||||
{!! "keys.push('" . Utils::toCamelCase(\App\Models\GatewayType::getAliasFromId($type)).'Button' . "');" !!}
|
||||
{!! "vals.push('" . Form::flatButton('pay_now', '#36c157') . "');" !!}
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
var includesPasswordPlaceholder = str.indexOf('$password') != -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user