From 77b97a7195b9c4a8d67b05729caefa76578e2732 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 13 Apr 2018 14:23:17 +0300 Subject: [PATCH] Support variables in custom gateways --- .../views/accounts/account_gateway.blade.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/resources/views/accounts/account_gateway.blade.php b/resources/views/accounts/account_gateway.blade.php index dbdb0a342cec..efc672bd6b91 100644 --- a/resources/views/accounts/account_gateway.blade.php +++ b/resources/views/accounts/account_gateway.blade.php @@ -18,6 +18,7 @@ @parent @include('accounts.nav', ['selected' => ACCOUNT_PAYMENTS]) + @include('partials.email_templates')
@@ -105,9 +106,13 @@ {!! Former::checkbox($gateway->id.'_'.$field)->label(ucwords(Utils::toSpaceCase($field)))->text('enable')->value(1) !!} @elseif ($field == 'username' || $field == 'password') {!! Former::text($gateway->id.'_'.$field)->label('API '. ucfirst(Utils::toSpaceCase($field))) !!} - @elseif ($gateway->isCustom() && $field == 'text') - {!! Former::textarea($gateway->id.'_'.$field)->label(trans('texts.text'))->rows(6) !!} - @else + @elseif ($gateway->isCustom()) + @if ($field == 'text') + {!! Former::textarea($gateway->id.'_'.$field)->label(trans('texts.text'))->rows(6) !!} + @else + {!! Former::text($gateway->id.'_'.$field)->label('name')->appendIcon('question-sign')->addGroupClass('custom-text') !!} + @endif + @else {!! Former::text($gateway->id.'_'.$field)->label($gateway->id == GATEWAY_STRIPE ? trans('texts.secret_key') : ucwords(Utils::toSpaceCase($field))) !!} @endif @@ -351,6 +356,10 @@ $('.verification-file').toggle(enableApplePay); } + $('.custom-text .input-group-addon').click(function() { + $('#templateHelpModal').modal('show'); + }); + var gateways = {!! Cache::get('gateways') !!}; $(function() {