ildar-shaymukhametov_grandnode-refactorings/Grand.Web/Areas/Admin/Views/Vendor/_CreateOrUpdate.TabInfo.cshtml
@model VendorModel
<script>
        $(document).ready(function () {
            $("@Model.AllowCustomersToSelectPageSize").click(togglePageSize);
            togglePageSize();
        });

        function togglePageSize() {
            if ($('@Model.AllowCustomersToSelectPageSize').is(':checked')) {
                $('#pnlPageSize').hide();
                $('#pnlPageSizeOptions').show();
            } else {
                $('#pnlPageSize').show();
                $('#pnlPageSizeOptions').hide();
            }
        }
</script>
<vc:admin-widget widget-zone="vendor_details_info_top" additional-data="Model" />
@(await Html.LocalizedEditor<VendorModel, VendorLocalizedModel>("vendor-info-localized",
    @<div class="form-horizontal">
        <div class="form-body">
            <div class="form-group">
                <admin-label asp-for="@Model.Locales[item].Name" />
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="@Model.Locales[item].Name" />
                    <span asp-validation-for="@Model.Locales[item].Name"></span>
                </div>
            </div>
            <div class="form-group">
                <admin-label asp-for="@Model.Locales[item].Description" />
                <div class="col-md-9 col-sm-9">
                    <admin-textarea asp-for="@Model.Locales[item].Description"></admin-textarea>
                    <span asp-validation-for="@Model.Locales[item].Description"></span>
                </div>
            </div>
            <input asp-for="@Model.Locales[item].LanguageId" type="hidden" />
        </div>
    </div>
        ,
    @<div class="form-horizontal">
        <div class="form-body">
            <div class="form-group">
                <admin-label asp-for="Name" />
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="Name" />
                    <span asp-validation-for="Name"></span>
                </div>
            </div>
            <div class="form-group">
                <admin-label asp-for="Description" />
                <div class="col-md-9 col-sm-9">
                    <admin-textarea asp-for="Description"></admin-textarea>
                    <span asp-validation-for="Description"></span>
                </div>
            </div>
        </div>
    </div>
    ))
<div class="form-horizontal">
    <div class="form-body">
        <div class="form-group">
            <admin-label asp-for="Email" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="Email" />
                <span asp-validation-for="Email"></span>
            </div>
        </div>
        @if (!String.IsNullOrEmpty(Model.Id))
        {
            <div class="form-group">
                <admin-label asp-for="AssociatedCustomers" />
                <div class="col-md-9 col-sm-9">
                    <label class="control-label">
                        @if (Model.AssociatedCustomers.Count > 0)
                        {
                            for (int i = 0; i < Model.AssociatedCustomers.Count; i++)
                            {
                                @Html.ActionLink(Model.AssociatedCustomers[i].Email, "Edit", "Customer", new { id = Model.AssociatedCustomers[i].Id }, new { })
                                if (i != Model.AssociatedCustomers.Count - 1)
                                {
                                    <text>, </text>
                                }
                            }
                        }
                        else
                        {
                            @T("Admin.Vendors.Fields.AssociatedCustomerEmails.None")
                        }
                    </label>
                </div>
            </div>
        }
        <div class="form-group">
            <admin-label asp-for="PictureId" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="PictureId" />
                <span asp-validation-for="PictureId"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="StoreId" />
            <div class="col-md-9 col-sm-9">
                <admin-select asp-for="StoreId" asp-items="Model.AvailableStores" />
                <span asp-validation-for="StoreId"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="AdminComment" />
            <div class="col-md-9 col-sm-9">
                <admin-textarea asp-for="AdminComment"></admin-textarea>
                <span asp-validation-for="AdminComment"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="AllowCustomersToSelectPageSize" />
            <div class="col-md-9 col-sm-9">
                <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                    <admin-input asp-for="AllowCustomersToSelectPageSize" />
                    <div class="control__indicator"></div>
                </label>
                <span asp-validation-for="AllowCustomersToSelectPageSize"></span>
            </div>
        </div>
        <div class="form-group" id="pnlPageSize">
            <admin-label asp-for="PageSize" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="PageSize" />
                <span asp-validation-for="PageSize"></span>
            </div>
        </div>
        <div class="form-group" id="pnlPageSizeOptions">
            <admin-label asp-for="PageSizeOptions" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="PageSizeOptions" />
                <span asp-validation-for="PageSizeOptions"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="Active" />
            <div class="col-md-9 col-sm-9">
                <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                    <admin-input asp-for="Active" />
                    <div class="control__indicator"></div>
                </label>
                <span asp-validation-for="Active"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="DisplayOrder" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="DisplayOrder" />
                <span asp-validation-for="DisplayOrder"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="AllowCustomerReviews" />
            <div class="col-md-9 col-sm-9">
                <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                    <admin-input asp-for="AllowCustomerReviews" />
                    <div class="control__indicator"></div>
                </label>
                <span asp-validation-for="AllowCustomerReviews"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="Commission" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="Commission" /> [%]
                <span asp-validation-for="Commission"></span>
            </div>
        </div>
    </div>
</div>
@if (Model.Address.FaxEnabled || Model.Address.PhoneEnabled || Model.Address.StateProvinceEnabled || Model.Address.StreetAddressEnabled || Model.Address.ZipPostalCodeEnabled ||
 Model.Address.CityEnabled || Model.Address.CompanyEnabled || Model.Address.CountryEnabled || Model.Address.StreetAddress2Enabled)
{
    <div class="panel panel-default">
        <div class="panel-heading">
            @T("Admin.Vendors.Fields.Address")
        </div>
        <div class="panel-body">
            <admin-input asp-for="Address" asp-template="Address" />
        </div>
    </div>
}
<vc:admin-widget widget-zone="vendor_details_info_bottom" additional-data="Model" />