Commit ff0b1874 by Chamath

Updated the buttton text and message text with workflow template values.

CV and CL mandatory logic based on the workflow template values.
SecUser Extension writeability changes.
parent 8d290c9e
...@@ -46,6 +46,9 @@ public class ConfirmDetailsFP extends SaveFP ...@@ -46,6 +46,9 @@ public class ConfirmDetailsFP extends SaveFP
secUser.addRole(Utils.getRole(Utils.ROLE_APPLICANT, objTran)); secUser.addRole(Utils.getRole(Utils.ROLE_APPLICANT, objTran));
} }
//For Extension writeability
objTran.setAttrib(SecUser.PASSWORD_WRITEABILITY_KEY, secUser.getID());
Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate); Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate);
LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", secUser, " Candidate: " , candidate); LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", secUser, " Candidate: " , candidate);
......
...@@ -88,6 +88,9 @@ public class SendUserInvitationFP extends SaveFP ...@@ -88,6 +88,9 @@ public class SendUserInvitationFP extends SaveFP
if(comUser == null) if(comUser == null)
{ {
//For Extension writeability
objTran.setAttrib(SecUser.PASSWORD_WRITEABILITY_KEY, secUser.getID());
comUser = secUser.getExtensionOrCreate(CompanyUser.REFERENCE_CompanyUser); comUser = secUser.getExtensionOrCreate(CompanyUser.REFERENCE_CompanyUser);
secUser.setEmail(secUser.getUserName()); secUser.setEmail(secUser.getUserName());
......
...@@ -58,11 +58,16 @@ public class SendVerificationMailFP extends SaveFP ...@@ -58,11 +58,16 @@ public class SendVerificationMailFP extends SaveFP
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getPrivacyPolicyAgreed()), candidate, Candidate.FIELD_PrivacyPolicyAgreed, "agreePrivacy", exceptions, true, request); BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getPrivacyPolicyAgreed()), candidate, Candidate.FIELD_PrivacyPolicyAgreed, "agreePrivacy", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getConditionsAgreed()), candidate, Candidate.FIELD_ConditionsAgreed, "agreeTerms", exceptions, true, request); BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getConditionsAgreed()), candidate, Candidate.FIELD_ConditionsAgreed, "agreeTerms", exceptions, true, request);
if(job.getRequireCV()) if(job.getRequireCV() && job.getWorkFlowTemplate() != null && job.getWorkFlowTemplate().getIsCVMandatory())
{ {
BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CV, "uploadCV", exceptions, true, request); BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CV, "uploadCV", exceptions, true, request);
} }
if(job.getRequireCV() && job.getWorkFlowTemplate() != null && job.getWorkFlowTemplate().getIsCLMandatory())
{
BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CoverLetter, "uploadCover", exceptions, true, request);
}
BusinessObjectParser.assertFieldCondition(candidate.getGoogleAddressText() != null, candidate, Candidate.FIELD_GoogleAddressText, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(candidate.getGoogleAddressText() != null, candidate, Candidate.FIELD_GoogleAddressText, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getHasValidAddress()), candidate, Candidate.FIELD_GoogleAddressText, "invalid", exceptions, true, request); BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getHasValidAddress()), candidate, Candidate.FIELD_GoogleAddressText, "invalid", exceptions, true, request);
......
...@@ -395,6 +395,9 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -395,6 +395,9 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
LogMgr.log(LOG, LogLevel.PROCESSING1, "Created new sec user : " , secUser); LogMgr.log(LOG, LogLevel.PROCESSING1, "Created new sec user : " , secUser);
} }
//For Extension writeability
objTran.setAttrib(SecUser.PASSWORD_WRITEABILITY_KEY, secUser.getID());
Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate); Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate);
if(newUser) if(newUser)
...@@ -464,6 +467,9 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -464,6 +467,9 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
if(candidate == null) if(candidate == null)
{ {
//For Extension writeability
objTran.setAttrib(SecUser.PASSWORD_WRITEABILITY_KEY, secUser.getID());
candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate); candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate);
} }
......
...@@ -85,6 +85,9 @@ public class PerformaOAuthCallbackDecorator implements ServletDecorator, Initial ...@@ -85,6 +85,9 @@ public class PerformaOAuthCallbackDecorator implements ServletDecorator, Initial
{ {
secUser.addRole(Role.searchNAME(secUser.getTransaction(), Utils.ROLE_APPLICANT)); secUser.addRole(Role.searchNAME(secUser.getTransaction(), Utils.ROLE_APPLICANT));
//For Extension writeability
secUser.getTransaction().setAttrib(SecUser.PASSWORD_WRITEABILITY_KEY, secUser.getID());
Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate); Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate);
candidate.setUser(secUser); candidate.setUser(secUser);
......
...@@ -5,20 +5,22 @@ ...@@ -5,20 +5,22 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
String nextPage = WebUtils.getSamePageInRenderMode(request, "SignIn"); String nextPage = WebUtils.getSamePageInRenderMode(request, "SignIn");
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
String id = request.getParameter("id"); String id = request.getParameter("id");
String key = request.getParameter("key"); String key = request.getParameter("key");
String candidateId = request.getParameter("aid"); String candidateId = request.getParameter("aid");
String pin = request.getParameter("pin"); String pin = request.getParameter("pin");
SecUser secUser = null; SecUser secUser = null;
Candidate candidate = null; Candidate candidate = null;
SecUser loggedInUser = SecUser.getTXUser(transaction); SecUser loggedInUser = SecUser.getTXUser(transaction);
WorkFlowTemplate workFlowTemplate = null;
if(id != null && key != null) if(id != null && key != null)
{ {
job = Job.searchJobKey(transaction, Long.parseLong(id), key); job = Job.searchJobKey(transaction, Long.parseLong(id), key);
workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
process.setAttribute("Job", job); process.setAttribute("Job", job);
} }
...@@ -134,7 +136,7 @@ ...@@ -134,7 +136,7 @@
<oneit:form name="applyJob" method="post" enctype="multipart/form-data"> <oneit:form name="applyJob" method="post" enctype="multipart/form-data">
<div class="apply-job-btn"> <div class="apply-job-btn">
<oneit:button value="Apply Now" name="gotoPage" skin="link" <oneit:button value='<%= workFlowTemplate != null ? workFlowTemplate.getLandingButtonText() : "Apply Now" %>' name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.toMap() %>"/> .toMap() %>"/>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
Candidate candidate = (Candidate) process.getAttribute("NewCandidate"); Candidate candidate = (Candidate) process.getAttribute("NewCandidate");
String confirmPage = WebUtils.getSamePageInRenderMode(request, "VerifyIdentity"); String confirmPage = WebUtils.getSamePageInRenderMode(request, "VerifyIdentity");
WorkFlowTemplate workFlowTemplate = null;
if(request.getParameter("JobID")!=null) if(request.getParameter("JobID")!=null)
{ {
...@@ -18,6 +19,8 @@ ...@@ -18,6 +19,8 @@
} }
Debug.assertion(job != null, "Job is null in applicant portal"); Debug.assertion(job != null, "Job is null in applicant portal");
workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
if(request.getParameter("UserName")!=null) if(request.getParameter("UserName")!=null)
{ {
...@@ -129,7 +132,7 @@ ...@@ -129,7 +132,7 @@
</div> </div>
<div class="main-verify-identity"> <div class="main-verify-identity">
<div class="pl-verify">Please verify your identity before applying to:</div> <div class="pl-verify"><%= workFlowTemplate != null ? workFlowTemplate.getVerificationHeaderText() : "Please verify your identity before applying to:" %></div>
<div class="verify-i-title"> <div class="verify-i-title">
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/> <oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
</div> </div>
...@@ -205,7 +208,7 @@ ...@@ -205,7 +208,7 @@
<div class="form-group"> <div class="form-group">
<oneit:button value="Continue" name="confirmDetails" cssClass="box-btn send-link-btn" <oneit:button value='<%= workFlowTemplate != null ? workFlowTemplate.getJobOutlineButtonText() : "Continue" %>' name="confirmDetails" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", confirmPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", confirmPage)
.mapEntry("Job",job) .mapEntry("Job",job)
.mapEntry("restartProcess", Boolean.TRUE) .mapEntry("restartProcess", Boolean.TRUE)
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
} }
Debug.assertion(job != null, "Job is null in applicant portal"); Debug.assertion(job != null, "Job is null in applicant portal");
WorkFlowTemplate workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
%> %>
<script type="text/javascript"> <script type="text/javascript">
var interval; var interval;
...@@ -41,12 +43,12 @@ ...@@ -41,12 +43,12 @@
</div> </div>
<div class="main-verify-identity"> <div class="main-verify-identity">
<div class="pl-verify">Thank-you for your application to:</div> <div class="pl-verify"><%= workFlowTemplate != null ? workFlowTemplate.getThankYouHeaderText() : "Thank-you for your application to:" %></div>
<div class="verify-i-title"> <div class="verify-i-title">
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/> <oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
</div> </div>
<div class="main-box-layout verify-i-setpone"> <div class="main-box-layout verify-i-setpone">
<div class="box-label">We will get in touch with you soon</div> <div class="box-label"><%= workFlowTemplate != null ? workFlowTemplate.getThankYouSecondaryText() : "We will get in touch with you soon" %></div>
</div> </div>
</div> </div>
</oneit:dynIncluded> </oneit:dynIncluded>
\ No newline at end of file
...@@ -26,13 +26,14 @@ ...@@ -26,13 +26,14 @@
jobApplication = JobApplication.createNewApplication(candidate, job); jobApplication = JobApplication.createNewApplication(candidate, job);
} }
Boolean isDiversityComplete = jobApplication.diversityCompleted(); Boolean isDiversityComplete = jobApplication.diversityCompleted();
Boolean isSelectionComplete = jobApplication.selectionCompleted(); Boolean isSelectionComplete = jobApplication.selectionCompleted();
Boolean isCultureComplete = jobApplication.cultureCompleted(); Boolean isCultureComplete = jobApplication.cultureCompleted();
Boolean isAssesmentComplete = jobApplication.assessmentCompleted(); Boolean isAssesmentComplete = jobApplication.assessmentCompleted();
Article jobApplicationArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOB_APPLICATION); Article jobApplicationArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOB_APPLICATION);
String nextPage = jobApplicationArticle.getLink(request) + "?JobID="+ job.getID().toString(); String nextPage = jobApplicationArticle.getLink(request) + "?JobID="+ job.getID().toString();
String successPage = WebUtils.getSamePageInRenderMode(request, jobApplication.isDiversityIncluded() ? "DiversityQuestions" : "VerificationSent") + "&JobID=" + job.getID(); String successPage = WebUtils.getSamePageInRenderMode(request, jobApplication.isDiversityIncluded() ? "DiversityQuestions" : "VerificationSent") + "&JobID=" + job.getID();
WorkFlowTemplate workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
if(!isDiversityComplete) if(!isDiversityComplete)
{ {
...@@ -318,7 +319,7 @@ ...@@ -318,7 +319,7 @@
</div> </div>
</div> </div>
<div class="text-center"> <div class="text-center">
<oneit:button value="Submit" name="sendVerificationMail" cssClass="box-btn send-link-btn" <oneit:button value='<%= workFlowTemplate != null ? workFlowTemplate.getApplicationButtonText() : "Submit" %>' name="sendVerificationMail" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
.mapEntry("Job",job) .mapEntry("Job",job)
.mapEntry("Candidate",candidate) .mapEntry("Candidate",candidate)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment