2017-09-13 09:56:33 +02:00
|
|
|
@model CreateTokenViewModel
|
2017-09-13 08:47:34 +02:00
|
|
|
@{
|
2017-10-27 10:53:04 +02:00
|
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
2021-04-08 15:32:42 +02:00
|
|
|
ViewData.SetActivePageAndTitle(StoreNavPages.Tokens, "Create a new token", Context.GetStoreData()?.StoreName);
|
2017-10-27 10:53:04 +02:00
|
|
|
ViewBag.HidePublicKey = ViewBag.HidePublicKey ?? false;
|
|
|
|
ViewBag.ShowStores = ViewBag.ShowStores ?? false;
|
2017-09-13 08:47:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
<div class="row">
|
2021-04-08 15:32:42 +02:00
|
|
|
<div class="col-lg-6">
|
|
|
|
<h4 class="mb-4">@ViewData["PageTitle"]</h4>
|
2017-10-27 10:53:04 +02:00
|
|
|
<form method="post">
|
|
|
|
<div class="form-group">
|
2021-06-06 13:44:54 +02:00
|
|
|
<label asp-for="Label" class="form-label"></label>
|
2020-07-22 15:29:03 +02:00
|
|
|
@if (ViewBag.HidePublicKey)
|
2017-10-27 10:53:04 +02:00
|
|
|
{
|
|
|
|
<small class="text-muted">optional</small>
|
|
|
|
}
|
|
|
|
<input asp-for="Label" class="form-control" />
|
|
|
|
<span asp-validation-for="Label" class="text-danger"></span>
|
|
|
|
</div>
|
2020-07-22 15:29:03 +02:00
|
|
|
@if (!ViewBag.HidePublicKey)
|
2017-10-27 10:53:04 +02:00
|
|
|
{
|
|
|
|
<div class="form-group">
|
2021-06-06 13:44:54 +02:00
|
|
|
<label asp-for="PublicKey" class="form-label"></label>
|
2017-10-27 10:53:04 +02:00
|
|
|
<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>
|
2020-07-22 15:29:03 +02:00
|
|
|
</div>
|
|
|
|
}
|
2017-10-17 06:52:30 +02:00
|
|
|
|
2020-07-22 15:29:03 +02:00
|
|
|
@if (ViewBag.ShowStores)
|
2017-10-27 10:53:04 +02:00
|
|
|
{
|
|
|
|
<div class="form-group">
|
2021-10-25 06:15:08 +02:00
|
|
|
<label asp-for="Stores" class="form-label"></label>
|
2021-05-19 04:39:27 +02:00
|
|
|
<select asp-for="StoreId" asp-items="Model.Stores" class="form-select"></select>
|
2017-10-27 10:53:04 +02:00
|
|
|
<span asp-validation-for="StoreId" class="text-danger"></span>
|
2020-07-22 15:29:03 +02:00
|
|
|
</div>
|
|
|
|
}
|
2017-10-27 10:53:04 +02:00
|
|
|
else
|
|
|
|
{
|
2020-07-22 15:29:03 +02:00
|
|
|
<input type="hidden" asp-for="StoreId" />
|
|
|
|
}
|
2017-10-27 10:53:04 +02:00
|
|
|
<div class="form-group">
|
2019-10-12 13:35:30 +02:00
|
|
|
<input id="RequestPairing" type="submit" value="Request pairing" class="btn btn-primary" />
|
2017-10-27 10:53:04 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|