From b1815226434ebabab80f38addded894f3ed64998 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 25 Oct 2018 10:38:47 +0300 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20require=20signature=20when=20cl?= =?UTF-8?q?icking=20=E2=80=98view=20invoice=E2=80=99=20from=20quote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/invoices/view.blade.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/resources/views/invoices/view.blade.php b/resources/views/invoices/view.blade.php index 67fc533ae..d7652eb21 100644 --- a/resources/views/invoices/view.blade.php +++ b/resources/views/invoices/view.blade.php @@ -163,7 +163,7 @@ @if ($invoice->isQuote()) {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}   @if ($showApprove) - {!! Button::success(trans('texts.approve'))->withAttributes(['id' => 'approveButton', 'onclick' => 'onApproveClick()'])->large() !!} + {!! Button::success(trans('texts.approve'))->withAttributes(['id' => 'approveButton', 'onclick' => 'onApproveClick()', 'class' => 'require-authorization'])->large() !!} @elseif ($invoiceLink = $invoice->getInvoiceLinkForQuote($contact->id)) {!! Button::success(trans('texts.view_invoice'))->asLinkTo($invoiceLink)->large() !!} @endif @@ -171,11 +171,13 @@ {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!} @elseif ($invoice->client->account->isGatewayConfigured() && floatval($invoice->balance) && !$invoice->is_recurring) {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}   - @if (count($paymentTypes) > 1) - {!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!} - @elseif (count($paymentTypes) == 1) - {{ trans('texts.pay_now') }} {!! $invoice->present()->gatewayFee($gatewayTypeId) !!} - @endif + + @if (count($paymentTypes) > 1) + {!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!} + @elseif (count($paymentTypes) == 1) + {{ trans('texts.pay_now') }} {!! $invoice->present()->gatewayFee($gatewayTypeId) !!} + @endif + @else {!! Button::normal(trans('texts.download'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!} @endif @@ -277,7 +279,7 @@ @endif @if ($account->requiresAuthorization($invoice)) - $('#paymentButtons a').on('click', function(e) { + $('.require-authorization a').on('click', function(e) { e.preventDefault(); window.pendingPaymentHref = $(this).attr('href'); showAuthorizationModal();