btcpayserver/BTCPayServer/Views/UIInvoice/InvoiceStatusChangePartial.cshtml
d11n 77fba4aee3
Add more translations (#6302)
* Newlines

* Dashboard

* Add more translations

* Moar

* Remove   from translated texts

* Dictionary controller translations

* Batch 1 of controller updates

* Batch 2 of controller updates

* Component translations

* Batch 3 of controller updates

* Fixes
2024-10-17 22:51:40 +09:00

47 lines
2.7 KiB
Text

@inject UserManager<ApplicationUser> _userManager
@* This is a temporary infobox to inform users about the state changes in 1.4.0. It should be removed eventually. *@
@if ((await _userManager.GetUserAsync(User)).GetBlob()?.ShowInvoiceStatusChangeHint is true)
{
<div class="alert alert-light alert-dismissible fade show mb-5" role="alert">
<form method="post" asp-controller="UIManage" asp-action="DisableShowInvoiceStatusChangeHint" id="invoicestatuschangeform">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<vc:icon symbol="close" />
</button>
<h5 class="alert-heading">Updated in v1.4.0</h5>
<p class="mb-2" text-translate="true">Invoice states have been updated to match the Greenfield API:</p>
<div class="row">
<div class="col-12 col-md-6">
<ul class="list-unstyled mb-md-0">
<li>
<span text-translate="true" class="badge badge-processing">Paid</span>
<span text-translate="true" class="mx-1">is now shown as</span>
<span text-translate="true" class="badge badge-processing">Processing</span>
</li>
<li class="mt-2">
<span text-translate="true" class="badge badge-settled">Completed</span>
<span text-translate="true" class="mx-1">is now shown as</span>
<span text-translate="true" class="badge badge-settled">Settled</span>
</li>
<li class="mt-2">
<span text-translate="true" class="badge badge-settled">Confirmed</span>
<span text-translate="true" class="mx-1">is now shown as</span>
<span text-translate="true" class="badge badge-settled">Settled</span>
</li>
</ul>
</div>
<div class="col-12 col-md-6 d-flex justify-content-md-end align-items-md-end">
<button name="command" type="submit" value="save" class="btn btn-sm btn-outline-secondary" data-bs-dismiss="alert" text-translate="true">Don't Show Again</button>
</div>
</div>
</form>
</div>
<script>
document.getElementById("invoicestatuschangeform").addEventListener("submit", event => {
event.preventDefault();
const xhttp = new XMLHttpRequest();
xhttp.open('POST', event.target.getAttribute('action'), true);
xhttp.send(new FormData(event.target));
});
</script>
}