mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Prevente duplicate quote approvals
This commit is contained in:
parent
679c1c85c9
commit
980c382f79
@ -163,7 +163,7 @@
|
|||||||
@if ($invoice->isQuote())
|
@if ($invoice->isQuote())
|
||||||
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||||
@if ($showApprove)
|
@if ($showApprove)
|
||||||
{!! Button::success(trans('texts.approve'))->asLinkTo(URL::to('/approve/' . $invitation->invitation_key))->large() !!}
|
{!! Button::success(trans('texts.approve'))->withAttributes(['id' => 'approveButton', 'onclick' => 'onApproveClick()'])->large() !!}
|
||||||
@endif
|
@endif
|
||||||
@elseif ( ! $invoice->canBePaid())
|
@elseif ( ! $invoice->canBePaid())
|
||||||
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||||
@ -289,6 +289,11 @@
|
|||||||
$('#authorizationModal').modal('show');
|
$('#authorizationModal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onApproveClick() {
|
||||||
|
$('#approveButton').prop('disabled', true);
|
||||||
|
location.href = "{{ url('/approve/' . $invitation->invitation_key) }}";
|
||||||
|
}
|
||||||
|
|
||||||
function onDownloadClick() {
|
function onDownloadClick() {
|
||||||
try {
|
try {
|
||||||
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
|
var doc = generatePDF(invoice, invoice.invoice_design.javascript, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user