mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 22:11:48 +01:00
Fix visual bug when user clicks on "Create refund" without selecting an option (#3624)
* Add missing refund option validation error element * Add missing hidden inputs for text elements * Move validation element above button * Update validation error message
This commit is contained in:
parent
c9f0988b95
commit
fe6b7dc1e3
2 changed files with 8 additions and 1 deletions
|
@ -311,7 +311,7 @@ namespace BTCPayServer.Controllers
|
|||
model.RefundStep = RefundSteps.SelectCustomAmount;
|
||||
return View(model);
|
||||
default:
|
||||
ModelState.AddModelError(nameof(model.SelectedRefundOption), "Invalid choice");
|
||||
ModelState.AddModelError(nameof(model.SelectedRefundOption), "Please select an option before proceeding");
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
<form method="post">
|
||||
<input type="hidden" asp-for="RefundStep" value="@Model.RefundStep"/>
|
||||
<input type="hidden" asp-for="Title" value="@Model.Title"/>
|
||||
<input type="hidden" asp-for="RateThenText" value="@Model.RateThenText"/>
|
||||
<input type="hidden" asp-for="CurrentRateText" value="@Model.CurrentRateText"/>
|
||||
<input type="hidden" asp-for="FiatText" value="@Model.FiatText"/>
|
||||
|
||||
@switch (Model.RefundStep)
|
||||
{
|
||||
case RefundSteps.SelectPaymentMethod:
|
||||
|
@ -59,6 +63,9 @@
|
|||
</div>
|
||||
<small class="form-text text-muted">The specified amount with the specified currency, at the rate when the refund will be sent. </small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span asp-validation-for="SelectedRefundOption" class="text-danger w-100"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button id="ok" type="submit" class="btn btn-primary btn-lg w-100">Create refund</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue