@model NewsItemModel
@using Microsoft.AspNetCore.Mvc.Razor;

@{ Func<int, HelperResult>
         template = @<div class="form-body">
    <div class="form-group">
        <admin-label asp-for="@Model.Locales[item].Title" />
        <div class="col-md-9 col-sm-9">
            <admin-input asp-for="@Model.Locales[item].Title" />
            <span asp-validation-for="@Model.Locales[item].Title"></span>
        </div>
    </div>
    <div class="form-group">
        <admin-label asp-for="@Model.Locales[item].Short" />
        <div class="col-md-9 col-sm-9">
            <admin-textarea asp-for="@Model.Locales[item].Short"></admin-textarea>
            <span asp-validation-for="@Model.Locales[item].Short"></span>
        </div>
    </div>
    <div class="form-group">
        <admin-label asp-for="@Model.Locales[item].Full" />
        <div class="col-md-9 col-sm-9">
            <admin-input asp-for="@Model.Locales[item].Full" asp-template="Editor" />
            <span asp-validation-for="@Model.Locales[item].Full"></span>
        </div>
    </div>
    <input asp-for="Locales[item].LanguageId" type="hidden" />
</div>;
}

<div class="form-horizontal">
    <vc:admin-widget widget-zone="news_details_info_top" additional-data="Model" />
    <div class="form-body">
        <localized-editor localized-template=@template name="newsitem-info-localized" language-ids=@Model.Locales.Select(c=>c.LanguageId).ToList()>
            <div class="form-group">
                <admin-label asp-for="Title" />
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="Title" />
                    <span asp-validation-for="Title"></span>
                </div>
            </div>
            <div class="form-group">
                <admin-label asp-for="Short" />
                <div class="col-md-9 col-sm-9">
                    <admin-textarea asp-for="Short"></admin-textarea>
                    <span asp-validation-for="Short"></span>
                </div>
            </div>
            <div class="form-group">
                <admin-label asp-for="Full" />
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="Full" asp-template="Editor" />
                    <span asp-validation-for="Full"></span>
                </div>
            </div>
        </localized-editor>
        <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="AllowComments" />
            <div class="col-md-9 col-sm-9">
                <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                    <admin-input asp-for="AllowComments" />
                    <div class="control__indicator"></div>
                </label>
                <span asp-validation-for="AllowComments"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="StartDate" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="StartDate" />
                <span asp-validation-for="StartDate"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="EndDate" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="EndDate" />
                <span asp-validation-for="EndDate"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="Published" />
            <div class="col-md-9 col-sm-9">
                <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                    <admin-input asp-for="Published" />
                    <div class="control__indicator"></div>
                </label>
                <span asp-validation-for="Published"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="CustomerGroups" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="CustomerGroups" />
                <span asp-validation-for="CustomerGroups"></span>
            </div>
        </div>
        <div class="form-group">
            <admin-label asp-for="Stores" />
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="Stores" />
                <span asp-validation-for="Stores"></span>
            </div>
        </div>
    </div>
    <vc:admin-widget widget-zone="news_details_info_bottom" additional-data="Model" />
</div>