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

    <h1>Certificate of Violations</h1>

    <p>Each motor carrier shall at least once every <em>(12) months</em>, require each driver it employs to prepare and furnish it with a list of all
violations of motor vehicle traffic laws and ordinances (other than parking violations) of which the driver has been convicted, or on
account of which he/she has forfeited bond or collateral during the preceding 12 months (§391.27).</p>

    <section>
        <ul class="formFields">
            <li class="big">
                <asp:Label runat="server" AssociatedControlID="txtName"
                    Text="Driver Name" />
                <asp:TextBox ID="txtName" runat="server"
                    MaxLength="128" Enabled="false" />
            </li>
            <li class="left">
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtLicenseNumber"
                    Text="required" Display="Dynamic" CssClass="required" />
                <asp:Label runat="server" AssociatedControlID="txtLicenseNumber"
                    Text="Driver's License Number" />
                <asp:TextBox ID="txtLicenseNumber" runat="server"
                    MaxLength="50" />
            </li>
            <li class="right">
            <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlState"
                Text="required" Display="Dynamic" CssClass="required" />
                <asp:Label runat="server" AssociatedControlID="ddlState"
                    Text="Driver's License State" />
                <ctrl:StatePicker ID="ddlState" runat="server" />
            </li>
        </ul>
    </section>

    <section>
        <ul class="formFields">
            <li>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="rbViolations"
                    Text="required" Display="Dynamic" CssClass="required" />
                <asp:RadioButtonList ID="rbViolations" runat="server" RepeatLayout="Flow">
                    <asp:ListItem Value="true" Text="Violations are listed below." />
                    <asp:ListItem Value="false" Text="I have had no violations." />
                </asp:RadioButtonList>
            </li>
        </ul>
    </section>

    <section>

        <p>I certify that the following is true and complete list of traffic violations (other than parking violations) for which I have
    been convicted or forfeited bond or collateral during the past <em>12 months.</em></p>

        <ctrl:Signature ID="signature" runat="server" ContextId="applicationroot" />

    </section>

    <ctrl:FormList ID="rptViolations" runat="server" AddText="Add Violation" TargetCount="0"><ItemTemplate>
        <asp:HiddenField ID="hidId" runat="server" Value="0" />
        <section>
            <div style="float: right; display: inline-block;">
                <asp:Button ID="btnRemove" runat="server" 
                    CausesValidation="false" OnClick="btnRemove_Click" 
                    Text="Remove" />
            </div>
            <h1><%# If(Container.ItemIndex = 0, 
                "Most Recent Violation", 
                "Violation " & CStr(Container.ItemIndex + 1)) %></h1>

            <ul class="formFields">
                <li>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtViolationDate"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="txtViolationDate"
                        Text="Date" />
                    <asp:TextBox ID="txtViolationDate" runat="server" MaxLength="50" TextMode="Date" />
                </li>
                <li>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtViolationOffense"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="txtViolationOffense"
                        Text="Offense" />
                    <asp:TextBox ID="txtViolationOffense" runat="server" MaxLength="256" TextMode="MultiLine" />
                </li>
                <li>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtViolationLocation"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="txtViolationLocation"
                        Text="Location" />
                    <asp:TextBox ID="txtViolationLocation" runat="server" MaxLength="50" />
                </li>
                <li>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtViolationVehicleType"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="txtViolationVehicleType"
                        Text="Type of Vehicle Operated" />
                    <asp:TextBox ID="txtViolationVehicleType" runat="server" MaxLength="50" />
                </li>
            </ul>
        </section>
    </ItemTemplate></ctrl:FormList>

</asp:Content>
