70 lines
2.2 KiB
Plaintext
70 lines
2.2 KiB
Plaintext
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<VideoGameQuotes.Web.Models.ContactModel>" MasterPageFile="~/Views/Shared/Site.Master" %>
|
|
<%@ Import Namespace="Portoa.Web.Util" %>
|
|
<asp:Content runat="server" ID="Title" ContentPlaceHolderID="TitleContent">Contact</asp:Content>
|
|
<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent">
|
|
<h2>Contact</h2>
|
|
|
|
<p><%= Html.ValidationMessage("client") %></p>
|
|
|
|
<% using (Html.BeginForm("Contact", "Home")) { %>
|
|
<div class="contact-form">
|
|
<%= Html.HiddenFor(model => model.HashedCaptchaAnswer) %>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.Name) %>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.Name) %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.Email) %>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.Email) %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.Message) %>
|
|
<br />
|
|
<%= Html.TextAreaFor(model => model.Message) %>
|
|
</p>
|
|
|
|
<p>
|
|
Are you human? <small style="position: relative"><a href="#" id="captcha-question">[click for correct answer]</a></small>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.CaptchaAnswer) %>
|
|
</p>
|
|
|
|
<div class="form-submit-container">
|
|
<div class="form-submit">
|
|
<%= Html.Submit("Send!")%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% } %>
|
|
</asp:Content>
|
|
|
|
<asp:Content ContentPlaceHolderID="DeferrableScripts" runat="server">
|
|
<script type="text/javascript">//<![CDATA[
|
|
$(document).ready(function() {
|
|
$("#captcha-question").click(function() {
|
|
if ($("#captcha-dialog").length) {
|
|
$("#captcha-dialog").remove();
|
|
} else {
|
|
$("<div/>")
|
|
.attr("id", "captcha-dialog")
|
|
.addClass("dialog")
|
|
.css({ top: "20px" })
|
|
.append(
|
|
$("<span>The answer is <strong></strong></span>")
|
|
.css({ "white-space": "nowrap" })
|
|
.find("strong")
|
|
.text("<%= Model.UnhashedCaptchaAnswer %>")
|
|
.end()
|
|
).insertAfter($("#captcha-question"));
|
|
}
|
|
|
|
return false;
|
|
});
|
|
});
|
|
//]]></script>
|
|
</asp:Content> |