<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Application/Application.Master" CodeBehind="GeneralQuestions.aspx.vb" Inherits="DriverPortal.GeneralQuestions" %>
<%@ MasterType VirtualPath="Application.Master" %>

<%@ Register TagPrefix="ctrl" Namespace="DriverPortal" Assembly="DriverPortal" %>
<%@ Register Src="~/_include/controls/SocialBox.ascx" TagPrefix="ctrl" TagName="SocialBox" %>
<%@ 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">

    <h2>General Questions</h2>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="txtNameFirst" class="form-label mt-4"
                Text="Applicant's Legal First Name" />
            <asp:TextBox ID="txtNameFirst" runat="server" class="form-control"
                MaxLength="50" />
            <asp:RequiredFieldValidator runat="server" ControlToValidate="txtNameFirst"
                Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
                    <asp:Label runat="server" AssociatedControlID="txtNameMiddle" class="form-label mt-4"
                        Text="Applicant's Legal Middle Name" />
                    <asp:TextBox ID="txtNameMiddle" runat="server" class="form-control"
                        MaxLength="50" />
                </div>
        <div class="form-group">
                    <asp:Label runat="server" AssociatedControlID="txtNameLast" class="form-label mt-4"
                        Text="Applicant's Legal Last Name" />
                    <asp:TextBox ID="txtNameLast" runat="server" class="form-control"
                        MaxLength="50" />
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtNameLast"
                        Text="required" Display="Dynamic" CssClass="required" />
                </div>
        <div class="form-group">
                    <asp:Label runat="server" AssociatedControlID="txtNameSuffix" class="form-label mt-4"
                        Text="Applicant's Legal Suffix" />
                    <asp:TextBox ID="txtNameSuffix" runat="server" class="form-control"
                        MaxLength="50" />
                </div>
            
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtSocial" class="form-label mt-4"
                    Text="Social Security Number" />
                <ctrl:SocialBox ID="txtSocial" runat="server" class="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtSocial"
                    Text="required" Display="Dynamic" CssClass="required" />
                </div>
            
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtDateBirth" class="form-label mt-4"
                    Text="Date of Birth" />
                <asp:TextBox ID="txtDateBirth" runat="server" class="form-control"
                    MaxLength="50" TextMode="Date" Width="250px" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtDateBirth"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtEmail" class="form-label mt-4"
                    Text="Email" />
                <asp:TextBox ID="txtEmail" runat="server" MaxLength="128"  class="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtEmail"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtPhone" class="form-label mt-4"
                    Text="Phone" />
                <asp:TextBox ID="txtPhone" runat="server" class="form-control"
                    MaxLength="50" TextMode="Phone"
                    placeholder="(###)###-####" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtPhone"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtAddress" class="form-label mt-4"
                    Text="Address" />
                <asp:TextBox ID="txtAddress" runat="server" class="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" class="form-label mt-4"
                    Text="Address" />
                <asp:TextBox ID="txtAddress2" runat="server" class="form-control"
                    MaxLength="128" />
        </div>
        <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtCity" class="form-label mt-4"
                    Text="City" />
                <asp:TextBox ID="txtCity" runat="server" class="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" class="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" class="form-label mt-4"
                    Text="Zip" />
                <asp:TextBox ID="txtZip" runat="server" class="form-control"
                    MaxLength="50" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtZip"
                    Text="required" Display="Dynamic" CssClass="required" />
        </div>
    <ul class="formFields">
            <li>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="ynCurrentAddress3Years"
                    Text="required" Display="Dynamic" CssClass="required" />
                <asp:Label runat="server" AssociatedControlID="ynCurrentAddress3Years"
                    Text="Have you lived at this address for more than three (3) years?" />
                <ctrl:YesNoPicker ID="ynCurrentAddress3Years" runat="server" UndefinedValue="true" />
    

<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
    <asp:RadioButton runat="server" AutoPostBack="true" CssClass="btn btn-outline-primary" ID="btnYes" Text=" Yes"/>
    <asp:RadioButton runat="server" AutoPostBack="true" CssClass="btn btn-outline-primary" ID="btnNo" Text=" No" />
</div>

            </li>
        </ul>
    <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>
    <section>
        <h2>General Questions</h2>

        <section>
            <ul class="formFields">
                <li class="big">
                    <asp:Label runat="server" AssociatedControlID="txtPosition"
                        Text="Position Applying For" />
                    <asp:TextBox ID="txtPosition" runat="server"
                        MaxLength="128" />
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="ddlSchedule"
                        Text="Schedule" />
                    <asp:DropDownList ID="ddlSchedule" runat="server">
                        <asp:ListItem Text="" />
                        <asp:ListItem Text="Full Time" />
                        <asp:ListItem Text="Part Time" />
                        <asp:ListItem Text="Temporary" />
                    </asp:DropDownList>
                </li>
            </ul>

            <ul class="formFields">
                <li>
                    <asp:Label runat="server" AssociatedControlID="txtReferredBy"
                        Text="Referred By" />
                    <asp:TextBox ID="txtReferredBy" runat="server"
                        MaxLength="128" CssClass="big" />
                </li>
                <li class="left">
                    <asp:Label runat="server" AssociatedControlID="txtPayExpected"
                        Text="Pay Expected" />
                    <asp:TextBox ID="txtPayExpected" runat="server"
                        MaxLength="50" TextMode="Number" step="0.01" />
                </li>
                <li class="right">
                    <asp:DropDownList ID="ddlPaySchedule" runat="server">
                        <asp:ListItem Text="Annual Salary" />
                        <asp:ListItem Text="Weekly" />
                        <asp:ListItem Text="Hourly" />
                        <asp:ListItem Text="Per Mile" />
                    </asp:DropDownList>
                </li>
            </ul>

            <ul class="formFields">
                <li>
                    <asp:Label runat="server" AssociatedControlID="ynPreviousEmployee"
                        Text="Have you worked here before?" />
                    <ctrl:YesNoPicker ID="ynPreviousEmployee" runat="server" />

                    <ul class="dependent"
                        data-dependency="<%= ynPreviousEmployee.ClientID %>"
                        data-value="true">
                        <li>
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtPreviousEmployeeDateStart"
                                DependencyControl="ynPreviousEmployee" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtPreviousEmployeeDateStart"
                                Text="If yes, from" />
                            <asp:TextBox ID="txtPreviousEmployeeDateStart" runat="server"
                                MaxLength="50" TextMode="Date" />
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtPreviousEmployeeDateEnd"
                                DependencyControl="ynPreviousEmployee" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtPreviousEmployeeDateEnd"
                                Text="to" />
                            <asp:TextBox ID="txtPreviousEmployeeDateEnd" runat="server"
                                MaxLength="50" TextMode="Date" />
                        </li>
                        <li class="big">
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtPreviousEmployeeLocation"
                                DependencyControl="ynPreviousEmployee" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtPreviousEmployeeLocation"
                                Text="Which location" />
                            <asp:TextBox ID="txtPreviousEmployeeLocation" runat="server"
                                MaxLength="128" />
                        </li>
                        <li>
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtPreviousEmployeePosition"
                                DependencyControl="ynPreviousEmployee" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtPreviousEmployeePosition"
                                Text="Position Held" />
                            <asp:TextBox ID="txtPreviousEmployeePosition" runat="server"
                                MaxLength="128" />
                        </li>
                        <li class="left">
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtPreviousEmployeePay"
                                DependencyControl="ynPreviousEmployee" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtPreviousEmployeePay"
                                Text="Rate of Pay" />
                            <asp:TextBox ID="txtPreviousEmployeePay" runat="server"
                                MaxLength="50" TextMode="Number" step="0.01" />
                        </li>
                        <li class="right">
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="ddlPreviousEmployeePaySchedule"
                                DependencyControl="ynPreviousEmployee" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:DropDownList ID="ddlPreviousEmployeePaySchedule" runat="server">
                                <asp:ListItem Text="Annual Salary" />
                                <asp:ListItem Text="Weekly" />
                                <asp:ListItem Text="Hourly" />
                                <asp:ListItem Text="Per Mile" />
                            </asp:DropDownList>
                        </li>
                        <li>
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtPreviousEmployeeReasonLeft"
                                DependencyControl="ynPreviousEmployee" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtPreviousEmployeeReasonLeft"
                                Text="Reason for Leaving" />
                            <asp:TextBox ID="txtPreviousEmployeeReasonLeft" runat="server"
                                TextMode="MultiLine" MaxLength="256" />
                        </li>
                    </ul>
                </li>
            </ul>

            <ul class="formFields">
                <li>
                    <asp:Label runat="server" AssociatedControlID="txtRelativesEmployed"
                        Text="Names of any relatives employed by this company" />
                    <asp:TextBox ID="txtRelativesEmployed" runat="server"
                        TextMode="MultiLine" Maxlength="256" />
                </li>
            </ul>

            <ul class="formFields">
                <li>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="ynCurrentlyEmployed"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="ynCurrentlyEmployed"
                        Text="Are you employed now?" />
                    <ctrl:YesNoPicker ID="ynCurrentlyEmployed" runat="server" />
                    <ul class="dependent"
                        data-dependency="<%= ynCurrentlyEmployed.ClientID %>"
                        data-value="false">
                        <li>
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtTimeSinceEmployed"
                                DependencyControl="ynCurrentlyEmployed" WhenValue="false"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtTimeSinceEmployed"
                                Text="If not, how long since leaving last employment?" />
                            <asp:TextBox ID="txtTimeSinceEmployed" runat="server"
                                MaxLength="50" />
                        </li>
                    </ul>
                </li>
            </ul>

            <ul class="formFields">
                <li>
                    <script>
                        function valLegallyEmployable_ClientValidate(sender, args) {
                            args.IsValid = args.Value == "true";
                        }
                    </script>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="ynLegallyEmployable"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="ynLegallyEmployable"
                        Text="Are you legally authorized to work in the United States?" />
                    <ctrl:YesNoPicker ID="ynLegallyEmployable" runat="server" />
                    <asp:CustomValidator ID="valLegallyEmployable" runat="server" Display="Dynamic" CssClass="required"
                        ControlToValidate="ynLegallyEmployable" ClientValidationFunction="valLegallyEmployable_ClientValidate"
                        Text="We apologize, but you are not eligible to be hired due to not being legally qualified to work in the United States." />
                </li>
            </ul>

            <ul class="formFields">
                <li>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="ynFelonyConviction"
                        Text="required" Display="Dynamic" CssClass="required" />
                    <asp:Label runat="server" AssociatedControlID="ynFelonyConviction"
                        Text="Have you ever been convicted of a felony?" />
                    <ctrl:YesNoPicker ID="ynFelonyConviction" runat="server" />
                    <ul class="dependent"
                        data-dependency="<%= ynFelonyConviction.ClientID %>"
                        data-value="true">
                        <li>
                            <ctrl:RequiredDependentFieldValidator runat="server" ControlToValidate="txtFelonyConvictionExplanation"
                                DependencyControl="ynFelonyConviction" WhenValue="true"
                                Text="required" Display="Dynamic" CssClass="required" />
                            <asp:Label runat="server" AssociatedControlID="txtFelonyConvictionExplanation"
                                Text="If yes, please explain" />

							<!--Please Correct this!!! -->
                            <asp:TextBox ID="txtFelonyConvictionExplanation" runat="server"
                                TextMode="MultiLine" MaxLength="256" />
                        </li>
                    </ul>
                </li>
            </ul>

        </section>
    </section>

    <section>
        <h2>Education</h2>

        <ctrl:FormList ID="rptSchools" runat="server" AddText="Add School" TargetCount="0"><ItemTemplate>
            <asp:HiddenField ID="hidSchoolId" runat="server" Value="0" />
            <section>
                <div style="float: right; display: inline-block;">
                    <asp:Button ID="btnRemoveSchool" runat="server" 
                        CausesValidation="false" OnClick="btnRemoveSchool_Click" 
                        Text="Remove" />
                </div>
                <h1>School <%# Container.ItemIndex + 1 %></h1>

                <ul class="formFields">
                    <li>
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlSchoolType"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="ddlSchoolType"
                            Text="Type of School" />
                        <asp:DropDownList ID="ddlSchoolType" runat="server">
                            <asp:ListItem Text="" />
                            <asp:ListItem Text="Elementary School" />
                            <asp:ListItem Text="High School" />
                            <asp:ListItem Text="Technical School" />
                            <asp:ListItem Text="College" />
                        </asp:DropDownList>
                    </li>
                    <li class="big">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtSchoolName"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="txtSchoolName"
                            Text="Institution Name" />
                        <asp:TextBox ID="txtSchoolName" runat="server" MaxLength="128" />
                    </li>
                    <li class="left">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtSchoolCity"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="txtSchoolCity"
                            Text="City" />
                        <asp:TextBox ID="txtSchoolCity" runat="server" MaxLength="50" />
                    </li>
                    <li class="right">
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlSchoolState"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="ddlSchoolState"
                            Text="State" />
                        <ctrl:StatePicker ID="ddlSchoolState" runat="server" />
                    </li>
                </ul>
                <ul class="formFields">
                    <li>
                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtSchoolHighestLevel"
                            Text="required" Display="Dynamic" CssClass="required" />
                        <asp:Label runat="server" AssociatedControlID="txtSchoolHighestLevel"
                            Text="Highest Grade Completed or Degree Earned" />
                        <asp:TextBox ID="txtSchoolHighestLevel" runat="server" MaxLength="50" />
                    </li>
                </ul>
            </section>
        </ItemTemplate></ctrl:FormList>

    </section>

</asp:Content>
