<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ 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>
<%
    ObjectTransaction   objTran     =   process.getTransaction ();
    String              currentPage =   WebUtils.getSamePageInRenderMode(request, "SignIn");
    String              nextPage    =   WebUtils.getArticleLink(request, objTran, WebUtils.JOB_APPLICATION, "Page");
    Job                 job         =   (Job) process.getAttribute("Job");
    Candidate           candidate   =   (Candidate) process.getAttribute("NewCandidate");
            
    if(request.getParameter("JobID")!=null)
    {
        job =   Job.getJobByID(transaction, Long.parseLong((String) request.getParameter("JobID")));
    }
    
    Debug.assertion(job != null, "Job is null in applicant portal");

    String  socialLoginNextPage =   nextPage + "&JobID=" + job.getID().toString();
%>
    <script type="text/javascript">
        var interval;
        $(document.body).addClass('bg-color');
    </script>
    <div class="main-verify-identity">
        <%
            BinaryContent   logo    =   job.getLogo();

            if(logo != null)
            {
                int logoHeight  =   45;
        %>
                <div class="verify-aust-logo">
                    <tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
                </div>
        <%
            }
        %>
        <div class="pl-verify">Please verify your identity before applying to:</div>
        <div class="verify-i-title">
            <oneit:toString value="<%= job.getJobTitle() %>"   mode="EscapeHTML"/>
        </div>
        <div class="main-box-layout verify-i-setpone">
            <div class="box-label">Sign in using your social network of choice</div>
            
            <oneit:form name="socialLogin" method="post">
                <ul class="social-login">
                    <li>
                        <oneit:button   value=" "  name="linkedinOAuthLogin"   skin="link"  cssClass="social_login_btn"
                                        disabled="<%= Utils.linkedInAvailable() ? "false" : "true" %>"
                                        requestAttribs="<%= CollectionUtils.mapEntry ("nextPage", socialLoginNextPage).toMap() %>">
                            <img src="<%= request.getContextPath() %>/images/login-linkedin-icon.svg" />
                        </oneit:button>
                    </li>
                    <li>
                        <oneit:button   value=" "  name="facebookOAuthLogin"   skin="link"  cssClass="social_login_btn"
                                        disabled="<%= Utils.facebookAvailable() ? "false" : "true" %>"
                                        requestAttribs="<%= CollectionUtils.mapEntry ("nextPage", socialLoginNextPage).toMap() %>">
                            <img src="<%= request.getContextPath() %>/images/login-facebok-icon.svg" />
                        </oneit:button>
                    </li>
                    <li>
                        <oneit:button   value=" "  name="googleOAuthLogin"     skin="link"  cssClass="social_login_btn"
                                        disabled="<%= Utils.googleAvailable() ? "false" : "true" %>"
                                        requestAttribs="<%= CollectionUtils.mapEntry ("nextPage", socialLoginNextPage).toMap() %>">
                            <img src="<%= request.getContextPath() %>/images/login-google.png" />
                        </oneit:button>
                    </li>
                </ul>                    
            </oneit:form>
                        
            <div class="box-br-line"><span></span></div>
            <div class="box-label">Sent! Check your email now 😀</div>
                
        </div>
    </div>
</oneit:dynIncluded>