mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-28 19:34:23 +01:00
* Rename user param to userId in API key redirect This way it is clearer what to expect and it also make the parameteer easier to consume. * Post redirect: Allow form url and prettify page - Form URL as alternative to controller/action for external URLs - Making it look nice and add explanation for non-JS case * APIKeys: Minor view updates fix * APIKeys: Use POST redirect for confirmation fix * UI: Minor update to confirm view Tidies it up and adapts to the newly added ConfirmAPIKeys view. * APIKeys: Update delete view Structures the information in title and description better. * APIKeys: Distinguish authorize and confirm (reuse) * Upgrade ChromeDriver * Test fixes * Clean up PostRedirect view By adding missing forgery token * Re-add tests for callback post values * Rename key param to apiKey in API key redirect * Update BTCPayServer/wwwroot/swagger/v1/swagger.template.authorization.json Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Use DEBUG conditional for postredirect-callback-test route * Remove unnecessary ChromeDriver references * Add debug flag * Remove debug flags Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
44 lines
1.4 KiB
Plaintext
44 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>
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<form method="post" id="postform" action="@action" class="modal-body text-center my-3">
|
|
@Html.AntiForgeryToken()
|
|
@foreach (var o in Model.Parameters)
|
|
{
|
|
<input type="hidden" name="@o.Key" value="@o.Value"/>
|
|
}
|
|
<noscript>
|
|
<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>
|
|
</noscript>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
document.forms.item(0).submit();
|
|
</script>
|
|
</body>
|
|
</html>
|