Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

2.2 KB
Raw Blame
@{
    Layout = "_AdminLayout";
    ViewBag.Title = Loc["Payments.CashOnDelivery.FriendlyName"];
}
@using Microsoft.AspNetCore.Mvc.Razor
@model Payments.CashOnDelivery.Models.ConfigurationModel
<input id="active-menu-item" type="hidden" value="/Admin/Payment/Methods"/>
@{
    Func<int, HelperResult>
        template = @<div class="grand-fields">
                       <admin-field asp-for="@Model.Locales[item].DescriptionText">
                           <admin-textarea asp-for="@Model.Locales[item].DescriptionText"></admin-textarea>
                       </admin-field>
                       <input asp-for="@Model.Locales[item].LanguageId" type="hidden"/>
                   </div>;
}
@* the page owns its header instead of the _ConfigurePlugin chrome: the store scope, the
   description customers read at checkout, then the fee and the switches *@
<form asp-controller="PaymentCashOnDelivery" asp-action="Configure" method="post">
    <admin-page title="@Loc["Payments.CashOnDelivery.FriendlyName"]" icon="bi-cash">
        <page-actions>
            <button type="submit" name="save" class="btn btn-primary">
                <i class="bi bi-check-lg"></i> @Loc["Admin.Common.Save"]
            </button>
        </page-actions>

        @await Component.InvokeAsync("StoreScope")

        <admin-card>
            <localized-editor localized-template="@template" name="plugin-settings-localized" language-ids="@Model.Locales.Select(c => c.LanguageId).ToList()">
                <div class="grand-fields">
                    <admin-field asp-for="DescriptionText">
                        <admin-textarea asp-for="DescriptionText"></admin-textarea>
                    </admin-field>
                </div>
            </localized-editor>
        </admin-card>
        <admin-card>
            <div class="grand-fields grand-fields--2col">
                <admin-field asp-for="AdditionalFee" size="md"/>
                <admin-field asp-for="AdditionalFeePercentage"/>
                <admin-field asp-for="ShippableProductRequired"/>
                <admin-field asp-for="SkipPaymentInfo"/>
                <admin-field asp-for="DisplayOrder" size="sm"/>
            </div>
        </admin-card>
    </admin-page>
</form>