From 77bd6f7bc59bef13bada56c28ecaa01610456e6c Mon Sep 17 00:00:00 2001 From: Joshua Dwire Date: Fri, 6 May 2016 10:50:50 -0400 Subject: [PATCH] Restyle add bank account page --- .../Controllers/PublicClientController.php | 1 + resources/lang/en/texts.php | 4 +- .../payments/add_paymentmethod.blade.php | 230 ++++++++---------- .../views/payments/payment_css.blade.php | 4 + 4 files changed, 109 insertions(+), 130 deletions(-) diff --git a/app/Http/Controllers/PublicClientController.php b/app/Http/Controllers/PublicClientController.php index 477c8912d6ac..7cfb675c28d4 100644 --- a/app/Http/Controllers/PublicClientController.php +++ b/app/Http/Controllers/PublicClientController.php @@ -764,6 +764,7 @@ class PublicClientController extends BaseController 'url' => URL::to('client/paymentmethods/add/'.$typeLink), 'clientFontUrl' => $account->getFontsUrl(), 'showAddress' => $accountGateway->show_address, + 'paymentTitle' => trans('texts.add_payment_method'), ]; if ($paymentType == PAYMENT_TYPE_STRIPE_ACH) { diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index bdd334d5454b..df368f9a59ad 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1262,7 +1262,9 @@ $LANG = array( 'link_with_plaid' => 'Link Account Instantly with Plaid', 'link_manually' => 'Link Manually', 'secured_by_plaid' => 'Secured by Plaid', - 'plaid_linked_status' => 'Your bank account at :bank' + 'plaid_linked_status' => 'Your bank account at :bank', + 'add_payment_method' => 'Add Payment Method', + 'account_holder_type' => 'Account Holder Type', ); return $LANG; diff --git a/resources/views/payments/add_paymentmethod.blade.php b/resources/views/payments/add_paymentmethod.blade.php index fe83a6a8413e..dedf80e83860 100644 --- a/resources/views/payments/add_paymentmethod.blade.php +++ b/resources/views/payments/add_paymentmethod.blade.php @@ -235,7 +235,7 @@ @if($paymentType == PAYMENT_TYPE_STRIPE_ACH) - {!! Former::vertical_open($url) + {!! Former::open($url) ->autocomplete('on') ->addClass('payment-form') ->id('payment-form') @@ -303,13 +303,15 @@
- @if ($client) + @if ($client && isset($invoiceNumber))

{{ $client->getDisplayName() }}

- @if(isset($invoiceNumber))

{{ trans('texts.invoice') . ' ' . $invoiceNumber }}|  {{ trans('texts.amount_due') }}: {{ $account->formatMoney($amount, $client, true) }}

- @endif @elseif ($paymentTitle) -

{{ $paymentTitle }}
{{ $paymentSubtitle }}

+

{{ $paymentTitle }} + @if(isset($paymentSubtitle)) +
{{ $paymentSubtitle }} + @endif +

@endif
@@ -324,91 +326,88 @@

 
 

-
-

{{ trans('texts.contact_information') }}

-
-
- {!! Former::text('first_name') - ->placeholder(trans('texts.first_name')) - ->autocomplete('given-name') - ->label('') !!} -
-
- {!! Former::text('last_name') - ->placeholder(trans('texts.last_name')) - ->autocomplete('family-name') - ->label('') !!} -
-
- @if (isset($paymentTitle)) + @if($paymentType != PAYMENT_TYPE_STRIPE_ACH) +

{{ trans('texts.contact_information') }}

-
- {!! Former::text('email') - ->placeholder(trans('texts.email')) - ->autocomplete('email') +
+ {!! Former::text('first_name') + ->placeholder(trans('texts.first_name')) + ->autocomplete('given-name') + ->label('') !!} +
+
+ {!! Former::text('last_name') + ->placeholder(trans('texts.last_name')) + ->autocomplete('family-name') ->label('') !!}
+ @if (isset($paymentTitle)) +
+
+ {!! Former::text('email') + ->placeholder(trans('texts.email')) + ->autocomplete('email') + ->label('') !!} +
+
+ @endif + +

 
 

+ + @if ($showAddress) +

{{ trans('texts.billing_address') }} {{ trans('texts.payment_footer1') }}

+
+
+ {!! Former::text('address1') + ->autocomplete('address-line1') + ->placeholder(trans('texts.address1')) + ->label('') !!} +
+
+ {!! Former::text('address2') + ->autocomplete('address-line2') + ->placeholder(trans('texts.address2')) + ->label('') !!} +
+
+
+
+ {!! Former::text('city') + ->autocomplete('address-level2') + ->placeholder(trans('texts.city')) + ->label('') !!} +
+
+ {!! Former::text('state') + ->autocomplete('address-level1') + ->placeholder(trans('texts.state')) + ->label('') !!} +
+
+
+
+ {!! Former::text('postal_code') + ->autocomplete('postal-code') + ->placeholder(trans('texts.postal_code')) + ->label('') !!} +
+
+ {!! Former::select('country_id') + ->placeholder(trans('texts.country_id')) + ->fromQuery($countries, 'name', 'id') + ->addGroupClass('country-select') + ->label('') !!} +
+
+ +

 
 

+ @endif + +

{{ trans('texts.billing_method') }}

@endif -

 
 

- - @if ($showAddress) -

{{ trans('texts.billing_address') }} - @if($paymentType != PAYMENT_TYPE_STRIPE_ACH) -  {{ trans('texts.payment_footer1') }}

- @endif -
-
- {!! Former::text('address1') - ->autocomplete('address-line1') - ->placeholder(trans('texts.address1')) - ->label('') !!} -
-
- {!! Former::text('address2') - ->autocomplete('address-line2') - ->placeholder(trans('texts.address2')) - ->label('') !!} -
-
-
-
- {!! Former::text('city') - ->autocomplete('address-level2') - ->placeholder(trans('texts.city')) - ->label('') !!} -
-
- {!! Former::text('state') - ->autocomplete('address-level1') - ->placeholder(trans('texts.state')) - ->label('') !!} -
-
-
-
- {!! Former::text('postal_code') - ->autocomplete('postal-code') - ->placeholder(trans('texts.postal_code')) - ->label('') !!} -
-
- {!! Former::select('country_id') - ->placeholder(trans('texts.country_id')) - ->fromQuery($countries, 'name', 'id') - ->addGroupClass('country-select') - ->label('') !!} -
-
- -

 
 

- @endif - -

{{ trans('texts.billing_method') }}

- - @if($paymentType == PAYMENT_TYPE_STRIPE_ACH) @if($accountGateway->getPlaidEnabled()) @@ -430,61 +429,34 @@

{{ trans('texts.link_manually') }}

@endif

{{ trans('texts.ach_verification_delay_help') }}

-
-
-
- {!! Former::radios('account_holder_type')->radios(array( - trans('texts.individual_account') => array('value' => 'individual'), - trans('texts.company_account') => array('value' => 'company'), - ))->inline()->label(''); !!} -
-
-
- {!! Former::text('account_holder_name') - ->placeholder(trans('texts.account_holder_name')) - ->label('') !!} -
-
-
-
+ {!! Former::radios('account_holder_type')->radios(array( + trans('texts.individual_account') => array('value' => 'individual'), + trans('texts.company_account') => array('value' => 'company'), + ))->inline()->label(trans('texts.account_holder_type')); !!} + {!! Former::text('account_holder_name') + ->label(trans('texts.account_holder_name')) !!} {!! Former::select('country') - ->placeholder(trans('texts.country_id')) + ->label(trans('texts.country_id')) ->fromQuery($countries, 'name', 'iso_3166_2') - ->addGroupClass('country-select') - ->label('') !!} -
-
+ ->addGroupClass('country-select') !!} {!! Former::select('currency') - ->placeholder(trans('texts.currency_id')) + ->label(trans('texts.currency_id')) ->fromQuery($currencies, 'name', 'code') - ->addGroupClass('currency-select') - ->label('') !!} -
-
-
-
+ ->addGroupClass('currency-select') !!} {!! Former::text('') ->id('routing_number') - ->placeholder(trans('texts.routing_number')) - ->label('') !!} -
-
-
-
-
-
-
+ ->label(trans('texts.routing_number')) !!} +
+
+
+
+
{!! Former::text('') ->id('account_number') - ->placeholder(trans('texts.account_number')) - ->label('') !!} -
-
+ ->label(trans('texts.account_number')) !!} {!! Former::text('') ->id('confirm_account_number') - ->placeholder(trans('texts.confirm_account_number')) - ->label('') !!} -
+ ->label(trans('texts.confirm_account_number')) !!}
@@ -653,7 +625,7 @@ $.ajax({ url:"{{ URL::to('/bank') }}/" + routingNumber, success:function(data) { - var els = $().add(document.createTextNode(data.name)).add('
').add(document.createTextNode(data.city + ", " + data.state)); + var els = $().add(document.createTextNode(data.name + ", " + data.city + ", " + data.state)); routingNumberCache[routingNumber] = els; // Still the same number? diff --git a/resources/views/payments/payment_css.blade.php b/resources/views/payments/payment_css.blade.php index c1e92dfa7522..58b39461b462 100644 --- a/resources/views/payments/payment_css.blade.php +++ b/resources/views/payments/payment_css.blade.php @@ -210,4 +210,8 @@ header h3 em { font-size:150%; } +#bank_name { + margin:5px 0 -5px; +} +