Prevent downloading cloned invoice PDF before saving

This commit is contained in:
Hillel Coren 2016-07-03 16:23:16 +03:00
parent d2c0003ec9
commit 03b696ac9e

View File

@ -529,7 +529,7 @@
{!! Former::select('invoice_design_id')->style('display:inline;width:150px;background-color:white !important')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") !!} {!! Former::select('invoice_design_id')->style('display:inline;width:150px;background-color:white !important')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") !!}
@endif @endif
@if ( $invoice->exists && ! $invoice->is_recurring) @if ( $invoice->exists && $invoice->id && ! $invoice->is_recurring)
{!! Button::primary(trans('texts.download_pdf')) {!! Button::primary(trans('texts.download_pdf'))
->withAttributes(['onclick' => 'onDownloadClick()', 'id' => 'downloadPdfButton']) ->withAttributes(['onclick' => 'onDownloadClick()', 'id' => 'downloadPdfButton'])
->appendIcon(Icon::create('download-alt')) !!} ->appendIcon(Icon::create('download-alt')) !!}