btcpayserver/BTCPayServer/Views/Stores/CreateToken.cshtml
2017-10-27 17:53:04 +09:00

56 lines
2.2 KiB
Text

@model CreateTokenViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["Title"] = "Create a new token";
ViewData.AddActivePage(StoreNavPages.Tokens);
ViewBag.HidePublicKey = ViewBag.HidePublicKey ?? false;
ViewBag.ShowStores = ViewBag.ShowStores ?? false;
}
<h4>@ViewData["Title"]</h4>
<div class="row">
<div class="col-md-6">
<form method="post">
<div class="form-group">
<label asp-for="Label"></label>
@if(ViewBag.HidePublicKey)
{
<small class="text-muted">optional</small>
}
<input asp-for="Label" class="form-control" />
<span asp-validation-for="Label" class="text-danger"></span>
</div>
@if(!ViewBag.HidePublicKey)
{
<div class="form-group">
<label asp-for="PublicKey"></label>
<small class="text-muted">Keep empty for server-initiated pairing</small>
<input asp-for="PublicKey" class="form-control" />
<span asp-validation-for="PublicKey" class="text-danger"></span>
</div>}
<div class="form-group">
<label asp-for="Facade"></label>
<select asp-for="Facade" class="form-control">
<option value="merchant">merchant</option>
<option value="pos">pos</option>
</select>
<span asp-validation-for="Facade" class="text-danger"></span>
</div>
@if(ViewBag.ShowStores)
{
<div class="form-group">
<label asp-for="StoreId" class="control-label"></label>
<select asp-for="StoreId" asp-items="Model.Stores" class="form-control"></select>
<span asp-validation-for="StoreId" class="text-danger"></span>
</div>}
else
{
<input type="hidden" asp-for="StoreId" />}
<div class="form-group">
<input type="submit" value="Request pairing" class="btn btn-default" />
</div>
</form>
</div>
</div>