btcpayserver/BTCPayServer/Views/UIStores/RequestPairing.cshtml

71 lines
2.5 KiB
Plaintext
Raw Normal View History

@using BTCPayServer.Abstractions.TagHelpers
@using BTCPayServer.Client
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model PairingModel
2017-09-13 16:50:36 +02:00
@{
var store = Context.GetStoreData();
Layout = store is null ? "_LayoutWizard" : "_Layout";
ViewData.SetActivePage(StoreNavPages.Tokens, "Pairing Permission", store?.Id);
}
@if (store is null)
{
@section Navbar {
<button type="button" class="cancel" onclick="history.back()">
<vc:icon symbol="close" />
</button>
}
2017-09-13 16:50:36 +02:00
}
<form asp-action="Pair" method="post" permissioned="@Policies.CanModifyStoreSettings">
<div class="sticky-header">
@if (store != null)
{
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a asp-action="ListTokens" asp-route-storeId="@store.Id">Access Tokens</a>
</li>
<li class="breadcrumb-item">
<a asp-action="CreateToken" asp-route-storeId="@store.Id">Create Token</a>
</li>
<li class="breadcrumb-item active" aria-current="page">@ViewData["Title"]</li>
</ol>
<h2>@ViewData["Title"]</h2>
</nav>
}
else
{
<h2>@ViewData["Title"]</h2>
}
<button id="ApprovePairing" type="submit" class="btn btn-primary mt-3" title="Approve this pairing demand">Approve</button>
</div>
<partial name="_StatusMessage" />
<div class="row">
<div class="col-sm-8 col-md-6 @(store is null ? "mx-auto" : "")">
<table class="table table-hover">
<tr>
<th>Label</th>
<td class="text-end">@Model.Label</td>
</tr>
<tr>
<th>SIN</th>
<td class="text-end">@Model.SIN</td>
</tr>
</table>
@if (store is null)
{
<div class="form-group">
<label asp-for="StoreId" class="form-label">Pair To Store</label>
<select asp-for="StoreId" asp-items="@(new SelectList(Model.Stores, "Id", "Name"))" class="form-select"></select>
<span asp-validation-for="StoreId" class="text-danger"></span>
</div>
}
else
{
<input asp-for="StoreId" type="hidden" />
}
<input type="hidden" name="pairingCode" value="@Model.Id"/>
</div>
</div>
</form>