2018-05-07 17:19:28 +02:00
|
|
|
@inject BTCPayServer.HostedServices.CssThemeManager themeManager
|
|
|
|
|
2018-08-30 20:16:24 +02:00
|
|
|
@model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel
|
2018-04-03 04:50:41 +02:00
|
|
|
@{
|
|
|
|
ViewData["Title"] = Model.Title;
|
|
|
|
Layout = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html class="h-100">
|
|
|
|
<head>
|
|
|
|
<title>@Model.Title</title>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
2018-05-07 17:19:28 +02:00
|
|
|
<link href="@this.Context.Request.GetAbsoluteUri(themeManager.BootstrapUri)" rel="stylesheet" />
|
2018-11-17 03:39:43 +01:00
|
|
|
@if (Model.CustomCSSLink != null)
|
|
|
|
{
|
|
|
|
<link href="@Model.CustomCSSLink" rel="stylesheet" />
|
|
|
|
}
|
2018-04-03 04:50:41 +02:00
|
|
|
</head>
|
|
|
|
<body class="h-100">
|
|
|
|
<div class="container d-flex h-100">
|
2018-11-13 08:29:18 +01:00
|
|
|
<div class="justify-content-center align-self-center text-center mx-auto px-2 py-3 w-100" style="margin: auto;">
|
|
|
|
<h1 class="mb-4">@Model.Title</h1>
|
2018-11-16 04:31:38 +01:00
|
|
|
<div class="row">
|
|
|
|
@for (int i = 0; i < Model.Items.Length; i++)
|
|
|
|
{
|
|
|
|
var className = (Model.Items.Length - i) > (Model.Items.Length % 4) ? "col-sm-6 col-lg-3" : "col-md align-self-start";
|
|
|
|
var item = Model.Items[i];
|
|
|
|
var image = item.Image;
|
|
|
|
var description = item.Description;
|
|
|
|
<div class="@className my-3 px-2">
|
|
|
|
<div class="card">
|
|
|
|
@if (!String.IsNullOrWhiteSpace(image))
|
|
|
|
{
|
|
|
|
<img class="card-img-top" src="@image" alt="Card image cap">
|
|
|
|
}
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">@item.Title</h5>
|
|
|
|
@if (!String.IsNullOrWhiteSpace(description))
|
2018-11-10 07:38:26 +01:00
|
|
|
{
|
2018-11-16 04:31:38 +01:00
|
|
|
<p class="card-text">@description</p>
|
|
|
|
}
|
|
|
|
@if (item.Custom)
|
|
|
|
{
|
|
|
|
<form method="post" asp-antiforgery="false" data-buy>
|
2018-11-17 03:39:43 +01:00
|
|
|
<input type="hidden" name="choicekey" value="@item.Id" />
|
2018-11-16 04:31:38 +01:00
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
<span class="input-group-text">@Model.CurrencySymbol</span>
|
|
|
|
</div>
|
|
|
|
<input class="form-control" type="number" min="@item.Price.Value" step="@Model.Step" name="amount"
|
|
|
|
value="@item.Price.Value" placeholder="Amount">
|
|
|
|
<div class="input-group-append">
|
2018-11-17 03:39:43 +01:00
|
|
|
<button class="btn btn-primary" type="submit">@Model.CustomButtonText</button>
|
2018-11-16 04:31:38 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<form method="post" asp-antiforgery="false">
|
2018-11-17 03:39:43 +01:00
|
|
|
<button type="submit" name="choiceKey" class="btn btn-primary" value="@item.Id">
|
|
|
|
@String.Format(Model.ButtonText, @item.Price.Formatted)</button>
|
2018-11-16 04:31:38 +01:00
|
|
|
</form>
|
2018-11-10 07:38:26 +01:00
|
|
|
}
|
|
|
|
</div>
|
2018-04-03 04:50:41 +02:00
|
|
|
</div>
|
2018-11-16 04:31:38 +01:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</div>
|
2018-09-28 06:31:59 +02:00
|
|
|
@if (Model.ShowCustomAmount)
|
2018-04-26 15:09:18 +02:00
|
|
|
{
|
2018-11-16 04:31:38 +01:00
|
|
|
<div class="row mt-2 mb-4">
|
|
|
|
<div class="col-lg-4 offset-lg-4 col-md-6 offset-md-3 px-2">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">Custom Amount</h5>
|
|
|
|
<p class="card-text">Create invoice to pay custom amount</p>
|
|
|
|
<form method="post" asp-antiforgery="false" data-buy>
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
<span class="input-group-text">@Model.CurrencySymbol</span>
|
|
|
|
</div>
|
|
|
|
<input class="form-control" type="number" min="0" step="@Model.Step" name="amount" placeholder="Amount">
|
2018-11-17 03:39:43 +01:00
|
|
|
<div class="input-group-append"><button class="btn btn-primary" type="submit">@Model.CustomButtonText</button></div>
|
2018-11-16 04:31:38 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
2018-04-03 04:50:41 +02:00
|
|
|
</div>
|
2018-11-16 04:31:38 +01:00
|
|
|
</div>
|
2018-04-03 04:50:41 +02:00
|
|
|
</div>
|
2018-04-26 15:09:18 +02:00
|
|
|
</div>
|
|
|
|
}
|
2018-04-03 04:50:41 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script src="~/vendor/jquery/jquery.js"></script>
|
2018-04-08 07:28:39 +02:00
|
|
|
<script src="~/vendor/bootstrap4/js/bootstrap.js"></script>
|
2018-04-03 04:50:41 +02:00
|
|
|
</body>
|
|
|
|
</html>
|