@model Nop.Web.Models.Common.ContactUsModel
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.ContactUs").Text);
}
<div class="contact-form">
    @Html.Action("TopicBlock", "Topic", new { systemName = "ContactUs" })
    <div class="clear">
    </div>
    @using (Ajax.BeginForm(new AjaxOptions
    {
        HttpMethod = "post",
        UpdateTargetId = "contactus-result",
        LoadingElementId = "contactus-sending-progress",
        InsertionMode = InsertionMode.Replace,
        OnSuccess = "onContactUsRequestSuccess();",
    }))
    { 
        <div class="send-email" id="contactus-send-form">
            <table class="table-container">
                <tr class="row">
                    <td class="item-name">
                        @Html.LabelFor(model => model.FullName):
                    </td>
                    <td class="item-value">
                        @Html.TextBoxFor(model => model.FullName, new { style = "Width: 250px;" })
                        @Html.ValidationMessageFor(model => model.FullName)
                    </td>
                </tr>
                <tr class="row">
                    <td class="item-name">
                        @Html.LabelFor(model => model.Email):
                    </td>
                    <td class="item-value">
                        @Html.TextBoxFor(model => model.Email, new { style = "Width: 250px;" })
                        @Html.ValidationMessageFor(model => model.Email)
                    </td>
                </tr>
                <tr class="row">
                    <td class="item-name">
                        @Html.LabelFor(model => model.Enquiry):
                    </td>
                    <td class="item-value">
                        @Html.TextAreaFor(model => model.Enquiry, new { style = "Width: 350px; Height: 150px;" })
                        @Html.ValidationMessageFor(model => model.Enquiry)
                    </td>
                </tr>
                <tr class="row">
                    <td class="item-name">
                    </td>
                    <td class="button">
                        <input type="submit" id="send-email" name="send-email" class="contactusbutton" value="@T("ContactUs.Button")" />
                        <span id="contactus-sending-progress" style="display: none;">@T("Common.Wait...")
                            <img src='@Href("~/Content/Images/ajax_loader_small.gif")' alt="@T("Common.Wait...")" />
                        </span>
                    </td>
                </tr>
            </table>
        </div>        
        <div class="clear">
        </div>
        <div class="result">
            <strong><span id="contactus-result"></span></strong>
        </div>        
    }
    <script type="text/javascript">
        
        function onContactUsRequestSuccess() {
            $('#contactus-send-form').hide();
        }
    </script>
</div>
