<%@ 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">
	Edytuj autora
</asp:Content>

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

    <h2>Edytuj autora</h2>

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

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

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

    <% } %>

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