<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>

<oneit:dynIncluded>
<%
    String      nextPage    =   WebUtils.getSamePageInRenderMode(request, "ApplicationOutline");
    Job         job         =   (Job) process.getAttribute("Job");
    Candidate   candidate   =   (Candidate) process.getAttribute("Candidate");
    
    if(candidate == null)
    {
        Tuple.T2<Candidate, Boolean>    tuple   =   job.getUserOrCreate();
        
        candidate   =   tuple.get0();
        
        process.setAttribute("Candidate", candidate);
        
        if(tuple.get1())
        {
            %><%@include file="/saferedirect.jsp" %><%
        }
    }

    SecUser secUser =   candidate.getUser();
%>
    <script>
        $(document.body).addClass('bg-color');
    </script>
    
    <oneit:form name="signIn" method="post" enctype="multipart/form-data">
        <div class="main-verify-identity">
            <div class="verify-aust-logo"><img src="images/australia-post.png"></div>
            <div class="pl-confirm text-center">Please confirm your details to continue</div>
            <div class="main-box-layout main-verify-step-2">
                <div class="form-group text-left">
                    <label>Email Address</label>
                    <oneit:ormInput obj="<%= secUser %>"        type="text" attributeName="UserName"    cssClass="form-control second-style" />
                </div>
                <div class="row">
                    <div class="form-group text-left col-sm-6 col-xs-12">
                        <label>First Name</label>
                        <oneit:ormInput obj="<%= secUser %>"    type="text" attributeName="FirstName"   cssClass="form-control second-style" />
                    </div>
                    <div class="form-group text-left col-sm-6 col-xs-12">
                        <label>Last Name</label>
                        <oneit:ormInput obj="<%= secUser %>"    type="text" attributeName="LastName"    cssClass="form-control second-style" />
                    </div>
                </div>
                <div class="form-group text-left">
                    <label>Phone</label>
                    <oneit:ormInput obj="<%= candidate %>"      type="text" attributeName="Phone"       cssClass="form-control second-style" />
                </div>
                <div class="text-center">
                    <oneit:button   value="Verify and proceed"  name="save" cssClass="box-btn margin-top-18"
                                    requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
                                                                    .mapEntry("attribNamesToRestore", CollectionUtils.createSet("Job","Candidate"))
                                                                    .mapEntry("restartProcess", Boolean.TRUE)
                                                                    .toMap() %>"/>
                </div>
            </div>
        </div>
    </oneit:form>
</oneit:dynIncluded>