mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-28 11:24:27 +01:00
In case JS is enabled the post redirect page showed an empty box. This box contains the explanation text for the non-JS text. This changes it to only show the modal box in casee JS is disabled, because the page – even though only visible briefly – looks weird for users with JS enabled.
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
@model PostRedirectViewModel
|
|
@{
|
|
Layout = null;
|
|
|
|
var routeData = Context.GetRouteData();
|
|
var routeParams = new Dictionary<string, string>();
|
|
if (routeData != null)
|
|
{
|
|
routeParams["walletId"] = routeData.Values["walletId"]?.ToString();
|
|
}
|
|
var action = Model.FormUrl ?? Url.Action(Model.AspAction, Model.AspController, routeParams);
|
|
}
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<partial name="Header" />
|
|
<title>Post Redirect</title>
|
|
</head>
|
|
<body>
|
|
<form method="post" id="postform" action="@action">
|
|
@Html.AntiForgeryToken()
|
|
@foreach (var o in Model.Parameters)
|
|
{
|
|
<input type="hidden" name="@o.Key" value="@o.Value"/>
|
|
}
|
|
<noscript>
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-body text-center my-3">
|
|
<p>
|
|
This redirection page is supposed to be submitted automatically.
|
|
<br>
|
|
Since you have not enabled JavaScript, please submit manually.
|
|
</p>
|
|
<button class="btn btn-primary" type="submit">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</noscript>
|
|
</form>
|
|
<script type="text/javascript">
|
|
document.forms.item(0).submit();
|
|
</script>
|
|
</body>
|
|
</html>
|