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

    <h3>Driver Address Information</h3>

        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtAddress" cssclass="form-label mt-4"
                    Text="Address" />
                <asp:TextBox ID="txtAddress" runat="server" cssclass="form-control"
                    MaxLength="128" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtAddress"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtAddress2" cssclass="form-label mt-4"
                    Text="Address" />
                <asp:TextBox ID="txtAddress2" runat="server" cssclass="form-control"
                    MaxLength="128" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtCity" cssclass="form-label mt-4"
                    Text="City" />
                <asp:TextBox ID="txtCity" runat="server" cssclass="form-control"
                    MaxLength="50" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtCity"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="ddlState" cssclass="form-label mt-4"
                    Text="State" />
                <ctrl:StatePicker ID="ddlState" runat="server" class="form-control"  />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlState"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtZip" cssclass="form-label mt-4"
                    Text="Zip" />
                <asp:TextBox ID="txtZip" runat="server" cssclass="form-control"
                    MaxLength="50" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtZip"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
            <ul class="formFields">
            <li>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="ynCurrentAddress3Years"
                    Text="required" Display="Dynamic" CssClass="required" />
                Have you lived at this address for more than three (3) years?
                <ctrl:YesNoPicker ID="ynCurrentAddress3Years" runat="server" UndefinedValue="true" />
            </li>
        </ul>                
        </div>

       <asp:PlaceHolder ID="phAddress" runat="server" Visible="false">
    <section class="dependent list" style="border-left: none; padding-left: 0;"
        data-dependency="<%= ynCurrentAddress3Years.ClientID %>"
        data-value="false">
        <p>Please provide all addresses for the previous three (3) years.</p>

        <ctrl:FormList ID="rptAddresses" runat="server" AddText="Add Address" TargetCount="0"><ItemTemplate>
            <asp:HiddenField ID="hidAddressId" runat="server" Value="0" />
            <section>
                <div style="float: right; display: inline-block;">
                    <asp:Button ID="btnRemoveAddress" runat="server" 
                        CausesValidation="false" OnClick="btnRemoveAddress_Click" 
                        Text="Remove" />
                </div>
                <h1>Previous Address</h1>

                <ul class="formFields">
                    <li class="big">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtPreviousStreet"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="txtPreviousStreet"
                            Text="Street Address" />
                        <asp:TextBox ID="txtPreviousStreet" runat="server" MaxLength="128" />
                    </li>
                    <li class="big">
                        <asp:Label runat="server" AssociatedControlID="txtPreviousStreet2"
                            Text="Street Address" />
                        <asp:TextBox ID="txtPreviousStreet2" runat="server" MaxLength="128" />
                    </li>
                    <li class="left">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtPreviousCity"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="txtPreviousCity"
                            Text="City" />
                        <asp:TextBox ID="txtPreviousCity" runat="server" MaxLength="50" />
                    </li>
                    <li class="left">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlPreviousState"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="ddlPreviousState"
                            Text="State" />
                        <ctrl:StatePicker ID="ddlPreviousState" runat="server" />
                    </li>
                    <li class="right">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtPreviousZip"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="txtPreviousZip"
                            Text="Zip" />
                        <asp:TextBox ID="txtPreviousZip" runat="server" MaxLength="50" />
                    </li>
                </ul>
                <ul class="formFields">
                    <li class="left">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtPreviousDuration"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="txtPreviousDuration"
                            Text="How Long" />
                        <asp:TextBox ID="txtPreviousDuration" runat="server" MaxLength="50" />
                    </li>
                </ul>
            </section>
        </ItemTemplate></ctrl:FormList>

    </section>
    </asp:PlaceHolder>


</asp:Content>

