btcpayserver/BTCPayServer/Views/Stores/ModifyWallet.cshtml
d11n 06db29dd43
Delete confirmation modals (#2614)
* Refactor confirm view: separate modal

* Add delete confirmation modals for apps and FIDO2

* Add delete confirmation modals for 2FA actions

* Add delete confirmation modals for api keys and webhooks

* Add delete confirmation modals for stores and store users

* Add delete confirmation modals for LND seed and SSH

* Add delete confirmation modals for rate rule scripting

* Test fixes and improvements

* Add delete confirmation modals for dynamic DNS

* Add delete confirmation modals for store access tokens

* Add confirmation modals for pull payment archiving

* Refactor confirm modal code

* Add confirmation input, update wording

* Update modal styles

* Upgrade ChromeDriver

* Simplify and unify confirmation input

* Test fixes

* Fix wording

* Add modals for wallet replace and removal
2021-09-07 11:55:53 +09:00

80 lines
2.8 KiB
Text

@model WalletSetupViewModel
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.Wallet, $"Modify {Model.CryptoCode} Wallet");
}
<header class="text-center">
<h1>@ViewData["Title"]</h1>
<p class="lead text-secondary mt-3">Change your current wallet settings</p>
</header>
<br>
<div class="mt-5 position-relative">
<h3 class="my-4">Current settings</h3>
<form method="post">
<input asp-for="Config" type="hidden" />
<input asp-for="DerivationScheme" type="hidden" />
<table class="table table-hover table-borderless table-responsive-md">
<tbody>
<tr>
<th class="w-150px">Derivation Scheme</th>
<td class="text-break">@Model.DerivationScheme</td>
</tr>
<tr>
<th>Root Fingerprint</th>
<td>@Model.RootFingerprint</td>
</tr>
@if (!string.IsNullOrEmpty(Model.KeyPath))
{
<tr>
<th>KeyPath</th>
<td>@Model.KeyPath</td>
</tr>
}
<tr>
<th>Source</th>
<td>@Model.Source</td>
</tr>
<tr>
<th>Type</th>
<td>@(Model.IsHotWallet ? "Hot wallet" : "Watch-only wallet")</td>
</tr>
</tbody>
</table>
</form>
<br>
<form method="get" asp-controller="Stores" asp-action="DeleteWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@Model.CryptoCode" class="mt-5">
<a asp-controller="Stores" asp-action="ReplaceWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@Model.CryptoCode"
id="ChangeWalletLink"
class="btn btn-secondary me-2"
data-bs-toggle="modal"
data-bs-target="#ConfirmModal"
data-title="Replace @Model.CryptoCode wallet"
data-description="@ViewData["ReplaceDescription"]"
data-confirm="Setup new wallet"
data-confirm-input="REPLACE">
Replace wallet
</a>
<button type="submit" class="btn btn-danger" id="Delete"
data-bs-toggle="modal"
data-bs-target="#ConfirmModal"
data-title="Remove @Model.CryptoCode wallet"
data-description="@ViewData["RemoveDescription"]"
data-confirm="Remove"
data-confirm-input="REMOVE">Remove wallet</button>
</form>
</div>
<partial name="_Confirm" model="@(new ConfirmModel($"{Model.CryptoCode} wallet", "Change", "Update"))" />
@section PageFootContent {
<script>
const deleteButton = document.getElementById('Delete')
deleteButton.addEventListener('click', event => {
event.preventDefault()
});
</script>
}