<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Driver2/Application/Application2.master" CodeBehind="TrafficViolations.aspx.vb" Inherits="Web.TrafficViolations" %>
<%@ MasterType VirtualPath="Application2.Master" %>
<%@ Register TagPrefix="ctrl" Namespace="Web" Assembly="Web" %>
<%@ Register Src="~/_include/controls/StatePicker.ascx" TagPrefix="ctrl" TagName="StatePicker" %>
<%@ Register Src="~/_include/controls/YesNoPicker.ascx" TagPrefix="ctrl" TagName="YesNoPicker" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phContent" runat="server">

    <h1>Traffic Violations</h1>


    
    <header>
        <h3>Traffic Convictions &amp; Forfeitures in the Past (3) Years Prior to Application Date</h3>
    </header>

    <section>
        <ul class="formFields">
            <li>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="ynViolations"
                    Text="required" Display="Dynamic" CssClass="required" />
                <asp:Label runat="server" AssociatedControlID="ynViolations"
                    Text="Have you had any traffic violation convictions or forfeitures (other than parking violations) in the past three (3) years prior to the application date?" />
                <ctrl:YesNoPicker ID="ynViolations" runat="server" />
            </li>
        </ul>
    </section>
    
    <ctrl:FormList ID="rptViolations" runat="server" AddText="Add Violation" TargetCount="0"><ItemTemplate>
        <asp:HiddenField ID="hidViolationId" runat="server" Value="0" />
        <section>
            <div style="float: right; display: inline-block;">
                <asp:Button ID="btnRemoveViolation" runat="server" 
                    CausesValidation="false" OnClick="btnRemoveViolation_Click" 
                    Text="Remove" />
            </div>
            <h1><%# If(Container.ItemIndex = 0,
                            "Most Recent",
                            "Violation " & CStr(Container.ItemIndex + 1)) %></h1>

            <ul class="formFields">
                <li class="left">
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtConvictionDate"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="txtConvictionDate"
                        Text="Conviction Date" />
                    <asp:TextBox ID="txtConvictionDate" runat="server" MaxLength="50" TextMode="Date" />
                </li>
                <li class="left">
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlConvictionState"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="ddlConvictionState" 
                        Text="Location" />
                    <ctrl:StatePicker ID="ddlConvictionState" runat="server" />
                </li>
                <li class="right">
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtConvictionCharge"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="txtConvictionCharge"
                        Text="Charge" />
                    <asp:TextBox ID="txtConvictionCharge" runat="server" MaxLength="128" />
                </li>
                <li class="right">
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtConvictionPenalty"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="txtConvictionPenalty"
                        Text="Penalty" />
                    <asp:TextBox ID="txtConvictionPenalty" runat="server" MaxLength="128" />
                </li>
            </ul>
        </section>
    </ItemTemplate></ctrl:FormList>


</asp:Content>
