<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<FotbalPortal.Models.Comment>" %>

<script src="<%: Url.Content("~/Scripts/jquery-1.8.2.min.js") %>"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>"></script>

<% using (Html.BeginForm()) { %>
    <%: Html.AntiForgeryToken() %>
    <%: Html.ValidationSummary(true) %>

    <fieldset>
        <legend>Komentář</legend>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.author) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.author) %>
            <%: Html.ValidationMessageFor(model => model.author) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.disabled) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.disabled) %>
            <%: Html.ValidationMessageFor(model => model.disabled) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.text) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.text) %>
            <%: Html.ValidationMessageFor(model => model.text) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.created) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.created) %>
            <%: Html.ValidationMessageFor(model => model.created) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.articleID) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.articleID) %>
            <%: Html.ValidationMessageFor(model => model.articleID) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.reactOnID) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.reactOnID) %>
            <%: Html.ValidationMessageFor(model => model.reactOnID) %>
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
<% } %>

<div>
    <%: Html.ActionLink("Back to List", "Index") %>
</div>
