chore(admin): prevent double submit on order show actions
This commit is contained in:
@@ -262,7 +262,7 @@
|
|||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="actions mt-16 gap-12">
|
<div class="actions mt-16 gap-12">
|
||||||
<form method="post" action="/admin/platform-orders/{{ $order->id }}/mark-paid-and-activate" onsubmit="return confirm('确认将该订单标记为已支付并生效?此操作会推进状态并尝试同步订阅');">
|
<form method="post" action="/admin/platform-orders/{{ $order->id }}/mark-paid-and-activate" data-action="disable-on-submit" onsubmit="return confirm('确认将该订单标记为已支付并生效?此操作会推进状态并尝试同步订阅');">
|
||||||
@csrf
|
@csrf
|
||||||
<button class="btn btn-sm" type="submit" @disabled(! $canMarkPaid || $markPaidBlockedByRefund || $markPaidBlockedByReceiptMismatch || $markPaidBlockedByMissingSubscriptionOnRenewal)>标记支付并生效</button>
|
<button class="btn btn-sm" type="submit" @disabled(! $canMarkPaid || $markPaidBlockedByRefund || $markPaidBlockedByReceiptMismatch || $markPaidBlockedByMissingSubscriptionOnRenewal)>标记支付并生效</button>
|
||||||
</form>
|
</form>
|
||||||
@@ -321,7 +321,7 @@
|
|||||||
]), $orderShowSelf);
|
]), $orderShowSelf);
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
<form method="post" action="/admin/platform-orders/{{ $order->id }}/activate-subscription" onsubmit="return confirm('确认同步订阅?将根据该订单创建/续期订阅');">
|
<form method="post" action="/admin/platform-orders/{{ $order->id }}/activate-subscription" data-action="disable-on-submit" onsubmit="return confirm('确认同步订阅?将根据该订单创建/续期订阅');">
|
||||||
@csrf
|
@csrf
|
||||||
@php
|
@php
|
||||||
$hasSyncErrorMeta = (bool) ($syncError ?? false);
|
$hasSyncErrorMeta = (bool) ($syncError ?? false);
|
||||||
|
|||||||
Reference in New Issue
Block a user