<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Wierszowki.Core.Linq.User>" %>
<%@ Import namespace="Wierszowki.Core.Validation"%> 
<asp:Content ID="js" ContentPlaceHolderID="jsContent" runat="server">
    <script src="../../Scripts/jquery-1.3.1.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.3.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.form.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.blockUI.js" type="text/javascript"></script>
    <script src="../../Scripts/date.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.datePicker.js" type="text/javascript"></script>
    <script src="../../Scripts/spiffy.js" type="text/javascript"></script>
    <script src="../../Scripts/jHelper.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validate.js" type="text/javascript" ></script>
    <script src="../../Scripts/xVal.jquery.validate.js" type="text/javascript"></script>
    <script src="../../Scripts/jqueryvalid.js" type="text/javascript"></script>
    <script src="../../Scripts/xValUser.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Dodaj użytkownika
</asp:Content>

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

    <h2>Dodaj użytkownika</h2>

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

    <% using (Html.BeginForm("Create", "User", Model, FormMethod.Post, new { id = "myform" })) 
    {
    %>
        <fieldset>
            <legend>Dane użytkownika</legend>
            <p>
                <label for="Login">Login:</label>
                <%= Html.TextBox("Login", Model.Login) %>
                <%= Html.ValidationMessage("Login", "*") %>
            </p>
            <p>
                <label for="Password">Hasło:</label>
                <%= Html.Password("Password", Model.Password)%>
                <%= Html.ValidationMessage("Password", "*") %>
            </p>
            <p>
                <label for="FirstName">Imię:</label>
                <%= Html.TextBox("FirstName", Model.FirstName)%>
                <%= Html.ValidationMessage("FirstName", "*") %>
            </p>
            <p>
                <label for="LastName">Nazwisko:</label>
                <%= Html.TextBox("LastName", Model.LastName)%>
                <%= Html.ValidationMessage("LastName", "*") %>
            </p>
            <p>
                <input type="submit" value="Dodaj" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Powrót do listy użytkowników", "Index") %>                
        <%=Html.ClientSideValidation<UserValidation>()%>
    </div>

</asp:Content>

