<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Wierszowki.Models.AuthorViewData>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Dodaj autora
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Dodaj autora</h2>

    <%= Html.ValidationSummary("Proszę poprawić błędy i spróbować ponownie.")%>

    <% using (Html.BeginForm("Create", "Author", Model.Author)) {%>

        <fieldset>
            <legend>Dane autora</legend>
            <p>
                <label for="FirstName">Imię:</label>
                <%= Html.TextBox("Author.FirstName", Model.Author.FirstName)%>
                <%= Html.ValidationMessage("FirstName", "*") %>
            </p>
            <p>
                <label for="LastName">Nazwisko:</label>
                <%= Html.TextBox("Author.LastName", Model.Author.LastName)%>
                <%= Html.ValidationMessage("LastName", "*")%>
            </p>
            <p>
                <label for="LastName">Zatrudnienie:</label>
                <%= Html.DropDownList("Author.EmploymentTypeId", ViewData.Model.EmploymentTypeList, "-- proszę wybrać --") %>
                <%= Html.ValidationMessage("EmploymentTypeId", "*")%>
            </p>
            <p>
                <input type="submit" value="Dodaj" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Powrót do listy autorów", "Index")%>
    </div>

</asp:Content>