Nu går det fint att skapa tournaments med teams och prizes
This commit is contained in:
72
MVCUI/Views/Tournaments/Create.cshtml
Normal file
72
MVCUI/Views/Tournaments/Create.cshtml
Normal file
@ -0,0 +1,72 @@
|
||||
@model MVCUI.Models.TournamentMVCModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Create";
|
||||
}
|
||||
|
||||
<p> </p>
|
||||
<h2 class="">Create New Tournament</h2>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<div class="row">
|
||||
@Html.AntiForgeryToken()
|
||||
<hr />
|
||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.TournamentName, htmlAttributes: new { @class = "control-label" })
|
||||
<div class="">
|
||||
@Html.EditorFor(model => model.TournamentName, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.TournamentName, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.EntryFee, htmlAttributes: new { @class = "control-label" })
|
||||
<div class="">
|
||||
@Html.EditorFor(model => model.EntryFee, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.EntryFee, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
<input type="submit" value="Create" class="btn btn-dark" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@Html.LabelFor(model => model.EnteredTeams, htmlAttributes: new { @class = "control-label" })
|
||||
<div class="">
|
||||
@foreach (var item in Model.EnteredTeams)
|
||||
{
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="SelectedEnteredTeams" value="@item.Value" /> @item.Text
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@Html.LabelFor(model => model.Prizes, htmlAttributes: new { @class = "control-label" })
|
||||
<div class="">
|
||||
@foreach (var item in Model.Prizes)
|
||||
{
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="SelectedPrizes" value="@item.Value" /> @item.Text
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div>
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
Reference in New Issue
Block a user