mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-30 19:34:30 +01:00
* Swap bootstrap asset files * Update themes and color definitions * Move general bootstrap customizations * Theme updates Theme updates * Remove BuildBundlerMinifier This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586 * Rewplace btn-block class with w-100 * Update badge classes * Remove old font family head variable * Update margin classes * Cleanups * Update float classes * Update text classes * Update padding classes * Update border classes * UPdate dropdown classes * Update select classes * Update neutral custom props * Update bootstrap and customizations * Update ChromeDriver; disable smooth scroll https://github.com/SeleniumHQ/selenium/issues/8295 * Improve alert messages * Improve bootstrap customizations * Disable reduced motion See also 7358282f * Update Bootstrap data attributes * Update file inputs * Update input groups * Replace deprecated jumbotron class * Update variables; re-add negative margin util classes * Update cards * Update form labels * Debug alerts * Fix aria-labelledby associations * Dropdown-related test fixes * Fix CanUseWebhooks test * Test fixes * Nav updates * Fix nav usage in wallet send and payouts * Update alert and modal close buttons * Re-add backdrop properties * Upgrade Bootstrap to v5 final * Update screen reader classes * Update font-weight classes * Update monospace font classes * Update accordians * Update close icon usage * Cleanup * Update scripts and style integrations * Update input group texts * Update LN node setup page * Update more form control classes * Update inline forms * Add js specific test * Upgrade Vue.js * Remove unused JS * Upgrade Bootstrap to v5.0.1 * Try container related test updates * Separate jQuery bundle * Remove jQuery from LND seed backup page * Remove unused code * Refactor email autofill js * Refactor camera scanner JS * Re-add tests * Re-add BuildBundlerMinifier * Do not minify bundles containing Bootstrap Details https://github.com/madskristensen/BundlerMinifier/issues/558 * Update bundles * Cleanup JS test * Cleanup tests involving dropdowns * Cleanup tests involving collapses * Cleanup locale additions in ConfigureCore * Cleanup bundles * Remove duplicate status message * Cleanup formatting * Fix missing validation scripts * Remove unused unminified Bootstrap js files * Fix classic theme * Fix Casa theme * Fix PoS validation
153 lines
7.7 KiB
Plaintext
153 lines
7.7 KiB
Plaintext
@using BTCPayServer.Payments
|
|
@model CheckoutExperienceViewModel
|
|
@{
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
ViewData.SetActivePageAndTitle(StoreNavPages.Checkout, "Checkout experience", Context.GetStoreData().StoreName);
|
|
}
|
|
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<form method="post">
|
|
@if (!ViewContext.ModelState.IsValid)
|
|
{
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
}
|
|
<h4 class="mb-3">Payment</h4>
|
|
@if (Model.PaymentMethods.Any())
|
|
{
|
|
<div class="form-group">
|
|
<label asp-for="DefaultPaymentMethod" class="form-label"></label>
|
|
<select asp-for="DefaultPaymentMethod" asp-items="Model.PaymentMethods" class="form-select 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-start-0 border-end-0 pt-3">
|
|
<input type="hidden" asp-for="PaymentMethodCriteria[index].PaymentMethod"/>
|
|
@PaymentMethodId.Parse(criteria.PaymentMethod).ToPrettyString()
|
|
</td>
|
|
<td class="border-start-0 border-end-0">
|
|
<select asp-for="PaymentMethodCriteria[index].Type"
|
|
class="form-select"
|
|
asp-items="@((PaymentMethodCriteriaViewModel.CriteriaType[]) Enum.GetValues(typeof(PaymentMethodCriteriaViewModel.CriteriaType))).Select(s => new SelectListItem(PaymentMethodCriteriaViewModel.ToString(s), s.ToString()))">
|
|
</select>
|
|
|
|
</td>
|
|
<td class="border-start-0 border-end-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="LazyPaymentMethods" type="checkbox" class="form-check-input" />
|
|
<label asp-for="LazyPaymentMethods" 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" class="form-label"></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" class="form-label"></label>
|
|
<select asp-for="DefaultLang" asp-items="Model.Languages" class="form-select w-auto"></select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="HtmlTitle" class="form-label"></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" class="form-label"></label>
|
|
<a href="https://docs.btcpayserver.org/Theme/#checkout-page-themes" target="_blank">
|
|
<span class="fa fa-question-circle-o text-secondary" 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" class="form-label"></label>
|
|
<a href="https://docs.btcpayserver.org/Theme/#checkout-page-themes" target="_blank">
|
|
<span class="fa fa-question-circle-o text-secondary" 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>
|
|
</div>
|
|
<button name="command" type="submit" class="btn btn-primary" value="Save">Save</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
@section PageFootContent {
|
|
<partial name="_ValidationScriptsPartial" />
|
|
<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>
|
|
}
|