
<%@ 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" %>
<%@page import="oneit.net.LoopbackHTTP"%>

<oneit:dynIncluded>
<%
    boolean toRedirect  =   GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job);
    Job     job         =   (Job) process.getAttribute("Job");

    Debug.assertion(job != null, "Job is null in admin portal create job");

    String  url         =   LoopbackHTTP.getRemoteAccessURL("/ApplicantPortal-ApplyJob.htm?" + "id=" + job.getID() + "&key=" + job.getRandomKey());
    String  nextPage    =   WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICANTS);

%>
    <script>
        function copyToClipboard() {
            
            var aux = document.createElement("input");
            aux.setAttribute("value", $("#jobURL").attr('href'));
            document.body.appendChild(aux);
            aux.select();
            document.execCommand("copy");
            document.body.removeChild(aux);
            alert("Link copied to clipboard");
        }
    </script>
    <oneit:form name="editJob" method="post"    enctype="multipart/form-data">
        
        <oneit:dynInclude   page="/extensions/applicantportal/inc/multifieldtext.jsp"   data="<%= CollectionUtils.EMPTY_MAP%>"/>
        
        <div class="main-created-job">
            <h1 class="page-title created-job-title">
                Congratulations! Your job is now open
            </h1>
            <div class="form-page-area">
                <div class="job-share-icon">
                    <ul>
                        <li class="share-link" onclick="copyToClipboard()"><a href="#"><img src="images/link-icon.png" /> Copy link to clipboard</a></li>
                        <li class="share-btn"><a href="#">Share</a></li>
                        <li class="linkdin-icon"><a href="#"><img src="images/linkedin-icon.png" /></a></li>
                        <li class="facebook-icon"><a href="#"><img src="images/facebook-icon.png"/></a></li>
                        <li class="shape-icon"><a href="#"><img src="images/shape.png" /></a></li>
                        <li class="more-icon"><a href="#"><img src="images/more-icon.png" /></a></li>
                    </ul>
                </div>
                <p class="job-txt">
                    This job will be open for 30 days until&nbsp;<oneit:toString value="<%= job.getApplyBy() %>" mode="PerformaDate"/>.
                </p>
                <div class="text-center">
                    <oneit:button   value="Go to Job"  name="gotoPage" cssClass="btn btn-primary largeBtn"
                                    requestAttribs='<%= CollectionUtils.mapEntry("nextPage", nextPage).toMap() %>'/>
                </div>
                <div class="space-55"></div>
            </div>
        </div>
    </oneit:form>
</oneit:dynIncluded>
