mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
150 lines
7.3 KiB
Plaintext
150 lines
7.3 KiB
Plaintext
@using BTCPayServer.Payments
|
|
@model CheckoutExperienceViewModel
|
|
@{
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
ViewData.SetActivePageAndTitle(StoreNavPages.Checkout, "Checkout experience");
|
|
}
|
|
|
|
<partial name="_StatusMessage" />
|
|
|
|
@if (!ViewContext.ModelState.IsValid)
|
|
{
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<form method="post">
|
|
<h4 class="mb-3">Payment</h4>
|
|
@if (Model.PaymentMethods.Any())
|
|
{
|
|
<div class="form-group">
|
|
<label asp-for="DefaultPaymentMethod"></label>
|
|
<select asp-for="DefaultPaymentMethod" asp-items="Model.PaymentMethods" class="form-control w-auto"></select>
|
|
</div>
|
|
<table class="table table-bordered table">
|
|
<tr>
|
|
<td colspan="3" class="text-decoration-none">
|
|
Enable payment methods only when amount is..
|
|
</td>
|
|
</tr>
|
|
|
|
@for (var index = 0; index < Model.PaymentMethodCriteria.Count; index++)
|
|
{
|
|
var criteria = Model.PaymentMethodCriteria[index];
|
|
<tr>
|
|
<td class="border-right-0 border-left-0 pt-3">
|
|
<input type="hidden" asp-for="PaymentMethodCriteria[index].PaymentMethod" />
|
|
@PaymentMethodId.Parse(criteria.PaymentMethod).ToPrettyString()
|
|
</td>
|
|
<td class="border-right-0 border-left-0 ">
|
|
<select asp-for="PaymentMethodCriteria[index].Type"
|
|
class="form-control"
|
|
asp-items="@((PaymentMethodCriteriaViewModel.CriteriaType[]) Enum.GetValues(typeof(PaymentMethodCriteriaViewModel.CriteriaType))).Select(s => new SelectListItem(PaymentMethodCriteriaViewModel.ToString(s), s.ToString()))">
|
|
</select>
|
|
|
|
</td>
|
|
<td class="border-right-0 border-left-0">
|
|
<input placeholder="6.15 USD" asp-for="PaymentMethodCriteria[index].Value" class="form-control my-0" style="max-width: 20ch;" />
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
}
|
|
|
|
<div class="form-group">
|
|
<div class="form-check">
|
|
<input asp-for="RequiresRefundEmail" type="checkbox" class="form-check-input" />
|
|
<label asp-for="RequiresRefundEmail" class="form-check-label"></label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-check">
|
|
<input asp-for="LightningAmountInSatoshi" type="checkbox" class="form-check-input" />
|
|
<label asp-for="LightningAmountInSatoshi" class="form-check-label"></label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-check">
|
|
<input asp-for="LightningPrivateRouteHints" type="checkbox" class="form-check-input" />
|
|
<label asp-for="LightningPrivateRouteHints" class="form-check-label"></label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-check">
|
|
<input asp-for="OnChainWithLnInvoiceFallback" type="checkbox" class="form-check-input" />
|
|
<label asp-for="OnChainWithLnInvoiceFallback" class="form-check-label"></label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-check">
|
|
<input asp-for="RedirectAutomatically" type="checkbox" class="form-check-input" />
|
|
<label asp-for="RedirectAutomatically" class="form-check-label"></label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-check">
|
|
<input asp-for="ShowRecommendedFee" type="checkbox" class="form-check-input" />
|
|
<label asp-for="ShowRecommendedFee" class="form-check-label"></label>
|
|
<p class="form-text text-muted">Fee will be shown for BTC and LTC onchain payments only.</p>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="RecommendedFeeBlockTarget"></label>
|
|
<input asp-for="RecommendedFeeBlockTarget" class="form-control" style="width:8ch" />
|
|
<span asp-validation-for="RecommendedFeeBlockTarget" class="text-danger"></span>
|
|
</div>
|
|
|
|
<h4 class="mt-5 mb-3">Appearance</h4>
|
|
<div class="form-group">
|
|
<label asp-for="DefaultLang"></label>
|
|
<select asp-for="DefaultLang" asp-items="Model.Languages" class="form-control w-auto"></select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="HtmlTitle"></label>
|
|
<input asp-for="HtmlTitle" class="form-control" />
|
|
<span asp-validation-for="HtmlTitle" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="CustomLogo"></label>
|
|
<a href="https://docs.btcpayserver.org/Theme/#checkout-page-themes" target="_blank"><span class="fa fa-question-circle-o" title="More information..."></span></a>
|
|
<input asp-for="CustomLogo" class="form-control" />
|
|
<span asp-validation-for="CustomLogo" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="CustomCSS"></label>
|
|
<a href="https://docs.btcpayserver.org/Theme/#checkout-page-themes" target="_blank"><span class="fa fa-question-circle-o" title="More information..."></span></a>
|
|
<input asp-for="CustomCSS" class="form-control" />
|
|
<span asp-validation-for="CustomCSS" class="text-danger"></span>
|
|
<p class="form-text text-muted">
|
|
Bundled Themes:
|
|
<a href="#" onclick="return setTheme(1);">Legacy</a>
|
|
| <a href="#" onclick="return setTheme(2);">Dark</a>
|
|
@* | <a href="#" onclick="return setTheme(0);">Default</a>*@
|
|
</p>
|
|
<script type="text/javascript">
|
|
function setTheme(themeChoice) {
|
|
if (themeChoice === 1) { // reserving 0 for potential clear down the road
|
|
$('#CustomCSS').val('/checkout/css/themes/legacy.css');
|
|
} else if (themeChoice == 2) {
|
|
$('#CustomCSS').val('/checkout/css/themes/dark.css');
|
|
} else {
|
|
$('#CustomCSS').val('');
|
|
}
|
|
return false;
|
|
}
|
|
</script>
|
|
</div>
|
|
<button name="command" type="submit" class="btn btn-primary" value="Save">Save</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
@section Scripts {
|
|
@await Html.PartialAsync("_ValidationScriptsPartial")
|
|
}
|