156 lines
4.5 KiB
Plaintext
156 lines
4.5 KiB
Plaintext
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<VideoGameQuotes.Web.Models.QuoteSubmitModel>" MasterPageFile="~/Views/Shared/Site.Master" %>
|
|
<%@ Import Namespace="Portoa.Web.Util" %>
|
|
<asp:Content runat="server" ID="Title" ContentPlaceHolderID="TitleContent">Submit New Quote</asp:Content>
|
|
<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent">
|
|
<h2>Submit New Quote</h2>
|
|
|
|
<%= Html.ValidationSummary() %>
|
|
|
|
<% using (Html.BeginForm()) { %>
|
|
<p>
|
|
<span id="game-select">
|
|
<%= Html.Label("Game", "GameId") %>
|
|
<br />
|
|
<%= Html.DropDownListFor(model => model.GameId, Model.GetGameList()) %>
|
|
</span>
|
|
|
|
<a href="#" id="create-game-link">Create new game</a>
|
|
</p>
|
|
|
|
<div id="create-game-form">
|
|
<fieldset>
|
|
<legend>Create new game</legend>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.GameName) %>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.GameName) %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.GameWebsite) %> <small>(link to Wikipedia page or something)</small>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.GameWebsite) %>
|
|
</p>
|
|
|
|
<p>
|
|
<span id="system-select">
|
|
<%= Html.LabelFor(model => model.SystemIds) %>
|
|
<br />
|
|
<%= Model.MakeSystemTable(Html) %>
|
|
</span>
|
|
<a href="#" id="create-system-link">Create new system</a>
|
|
</p>
|
|
|
|
<div id="create-system-form">
|
|
<fieldset>
|
|
<legend>Create new system</legend>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.SystemName) %>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.SystemName) %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.SystemAbbreviation) %>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.SystemAbbreviation) %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.SystemReleaseDate) %>
|
|
<br />
|
|
<%= Html.TextBox("SystemReleaseDate", DateTime.UtcNow.ToString("yyyy-MM-dd")) %>
|
|
</p>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<p>
|
|
<span id="publisher-select">
|
|
<%= Html.LabelFor(model => model.PublisherIds) %>
|
|
<br />
|
|
<%= Model.MakePublisherTable(Html) %>
|
|
</span>
|
|
<a href="#" id="create-publisher-link">Create new publisher</a>
|
|
</p>
|
|
|
|
<div id="create-publisher-form">
|
|
<fieldset>
|
|
<legend>Create new publisher</legend>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.PublisherName) %>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.PublisherName) %>
|
|
</p>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.PublisherWebsite) %>
|
|
<br />
|
|
<%= Html.TextBoxFor(model => model.PublisherWebsite) %>
|
|
</p>
|
|
</fieldset>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<p>
|
|
<%= Html.LabelFor(model => model.QuoteText) %>
|
|
<br />
|
|
<%= Html.TextAreaFor(model => model.QuoteText) %>
|
|
</p>
|
|
|
|
<%= Html.Submit("Submit") %>
|
|
<% } %>
|
|
</asp:Content>
|
|
<asp:Content runat="server" ID="DeferrableScripts" ContentPlaceHolderID="DeferrableScripts">
|
|
<script type="text/javascript">//<![CDATA[
|
|
$(document).ready(function() {
|
|
$("#create-game-link").click(function() {
|
|
//show the create game form
|
|
var $form = $("#create-game-form");
|
|
if ($form.is(":visible")) {
|
|
$("#create-game-link").text("Create new game");
|
|
} else {
|
|
$("#create-game-link").text("Use existing game");
|
|
$("#GameId").val("0");
|
|
}
|
|
|
|
$form.toggle();
|
|
$("#game-select").toggle();
|
|
return false;
|
|
});
|
|
|
|
$("#create-system-link").click(function() {
|
|
//show the create game form
|
|
var $form = $("#create-system-form");
|
|
if ($form.is(":visible")) {
|
|
$("#create-system-link").text("Create new system");
|
|
} else {
|
|
$("#create-system-link").text("Use existing system");
|
|
}
|
|
|
|
$form.toggle();
|
|
$("#system-select").toggle();
|
|
return false;
|
|
});
|
|
|
|
$("#create-publisher-link").click(function() {
|
|
//show the create game form
|
|
var $form = $("#create-publisher-form");
|
|
if ($form.is(":visible")) {
|
|
$("#create-publisher-link").text("Create new publisher");
|
|
} else {
|
|
$("#create-publisher-link").text("Use existing publisher");
|
|
}
|
|
|
|
$form.toggle();
|
|
$("#publisher-select").toggle();
|
|
return false;
|
|
});
|
|
});
|
|
//]]></script>
|
|
|
|
</asp:Content>
|