fix btn text

This commit is contained in:
Kukks 2021-10-08 13:36:08 +02:00 committed by Andrew Camilleri
parent 7d2aa28e1f
commit f89cdadde8
2 changed files with 3 additions and 3 deletions

View File

@ -232,7 +232,7 @@
<span class="text-muted small">
@{
var buttonText = string.IsNullOrEmpty(item.BuyButtonText) ? item.Custom != "false" ? Model.CustomButtonText : Model.ButtonText : item.BuyButtonText;
var buttonText = string.IsNullOrEmpty(item.BuyButtonText) ? (item.Custom == "true" || item.Custom == "topup") ? Model.CustomButtonText : Model.ButtonText : item.BuyButtonText;
if (item.Custom != "topup")
{
buttonText = buttonText.Replace("{0}",item.Price.Formatted)

View File

@ -19,7 +19,7 @@
@for (int x = 0; x < Model.Items.Length; x++)
{
var item = Model.Items[x];
var buttonText = string.IsNullOrEmpty(item.BuyButtonText) ? item.Custom != "false" ? Model.CustomButtonText : Model.ButtonText : item.BuyButtonText;
var buttonText = string.IsNullOrEmpty(item.BuyButtonText) ? (item.Custom == "true" || item.Custom == "topup") ? Model.CustomButtonText : Model.ButtonText : item.BuyButtonText;
if (item.Custom != "topup")
{
buttonText = buttonText.Replace("{0}",item.Price.Formatted)
@ -46,7 +46,7 @@
{
<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">
@buttonText
@Safe.Raw(buttonText)
</button>
</form>
}