mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 14:40:36 +01:00
Fix possible view exception in pos app
Replaced string.format with a simpler replace and also allow `{Price}` instead of `{0}` as it's obscure to non c# devs
This commit is contained in:
parent
74b6aa7353
commit
db7768ef57
2 changed files with 2 additions and 2 deletions
|
@ -249,7 +249,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer pt-0 bg-transparent border-0">
|
<div class="card-footer pt-0 bg-transparent border-0">
|
||||||
|
|
||||||
<span class="text-muted small">@String.Format(Model.ButtonText, @item.Price.Formatted)</span>
|
<span class="text-muted small">@Model.ButtonText.Replace("{0}",item.Price.Formatted).Replace("{Price}",item.Price.Formatted)</span>
|
||||||
@if (item.Inventory.HasValue)
|
@if (item.Inventory.HasValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
{
|
{
|
||||||
<form method="post" asp-controller="AppsPublic" asp-action="ViewPointOfSale" asp-route-appId="@Model.AppId" asp-antiforgery="false">
|
<form method="post" asp-controller="AppsPublic" asp-action="ViewPointOfSale" asp-route-appId="@Model.AppId" asp-antiforgery="false">
|
||||||
<button type="submit" name="choiceKey" class="js-add-cart btn btn-primary" value="@item.Id">
|
<button type="submit" name="choiceKey" class="js-add-cart btn btn-primary" value="@item.Id">
|
||||||
@String.Format(Model.ButtonText, @item.Price.Formatted)
|
@Model.ButtonText.Replace("{0}",item.Price.Formatted).Replace("{Price}",item.Price.Formatted)
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue