@model ContactVendorModel
@{
    Layout = "_ColumnsTwo";

    //title
    NopHtml.AddTitleParts(T("PageTitle.ContactVendor", Model.VendorName).Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-contact-page");
}
<div class="page vendor-contact-page">
    <div class="page-title panel-heading">
        <h1>@T("PageTitle.ContactVendor", Model.VendorName)</h1>
    </div>
    <div class="page-body">
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ContactVendorTop, additionalData = Model })
        @if (Model.SuccessfullySent)
        {
            <div class="alert alert-success">
                @Model.Result
            </div>
        }
        else
        {
            <form asp-route="ContactVendor" method="post">
                <div asp-validation-summary="ModelOnly" class="message-error"></div>
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="control-label col-sm-2 col-md-2" asp-for="FullName" asp-postfix=":"></label>
                        <div class="visible-xs form-title-rquired"><nop-required /></div>
                        <div class="col-sm-6 col-md-6 col-xs-12">
                            <input asp-for="FullName" placeholder="@T("ContactVendor.FullName.Hint")" class="fullname form-control" />
                        </div>
                        <div class="col-sm-4 col-md-4 col-xs-12">
                            <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                            <span asp-validation-for="FullName"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2 col-md-2" asp-for="Email" asp-postfix=":"></label>
                        <div class="visible-xs form-title-rquired"><nop-required /></div>
                        <div class="col-sm-6 col-md-6 col-xs-12">
                            <input asp-for="Email" placeholder="@T("ContactVendor.Email.Hint")" class="email form-control" />
                        </div>
                        <div class="col-sm-4 col-md-4 col-xs-12">
                            <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                            <span asp-validation-for="Email"></span>
                        </div>
                    </div>
                    @if (Model.SubjectEnabled)
                    {
                        <div class="form-group">
                            <label class="control-label col-sm-2 col-md-2" asp-for="Subject" asp-postfix=":"></label>
                            <div class="visible-xs form-title-rquired"><nop-required /></div>
                            <div class="col-sm-6 col-md-6 col-xs-12">
                                <input asp-for="Subject" placeholder="@T("ContactVendor.Subject.Hint")" class="subject form-control" />
                            </div>
                            <div class="col-sm-4 col-md-4 col-xs-12">
                                <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                                <span asp-validation-for="Subject"></span>
                            </div>
                        </div>
                    }
                    <div class="form-group">
                        <label class="control-label col-sm-2 col-md-2" asp-for="Enquiry" asp-postfix=":"></label>
                        <div class="col-sm-6 col-md-6 col-xs-12">
                            <textarea asp-for="Enquiry" placeholder="@T("ContactVendor.Enquiry.Hint")" class="enquiry form-control"></textarea>
                        </div>
                        <div class="col-sm-4 col-md-4 col-xs-12">
                            <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                            <span asp-validation-for="Enquiry"></span>
                        </div>
                    </div>
                    @if (Model.DisplayCaptcha)
                    {
                        <div class="form-group">
                            <div class="captcha-box col-sm-offset-2 col-md-offset-2 col-md-4">
                                <nop-captcha />
                            </div>
                        </div>
                    }
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-md-offset-2 col-md-2">
                            <button type="submit" name="send-email" class="btn btn-primary contact-us-button">@T("ContactVendor.Button")</button>
                        </div>
                    </div>
                </div>
            </form>
        }
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ContactVendorBottom, additionalData = Model })
    </div>
</div>