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
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);
LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", secUser, " Candidate: " , candidate);
......
......@@ -88,6 +88,9 @@ public class SendUserInvitationFP extends SaveFP
if(comUser == null)
{
//For Extension writeability
objTran.setAttrib(SecUser.PASSWORD_WRITEABILITY_KEY, secUser.getID());
comUser = secUser.getExtensionOrCreate(CompanyUser.REFERENCE_CompanyUser);
secUser.setEmail(secUser.getUserName());
......
......@@ -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.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);
}
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.isTrue(candidate.getHasValidAddress()), candidate, Candidate.FIELD_GoogleAddressText, "invalid", exceptions, true, request);
......
......@@ -395,6 +395,9 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
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);
if(newUser)
......@@ -464,6 +467,9 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
if(candidate == null)
{
//For Extension writeability
objTran.setAttrib(SecUser.PASSWORD_WRITEABILITY_KEY, secUser.getID());
candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate);
}
......
......@@ -85,6 +85,9 @@ public class PerformaOAuthCallbackDecorator implements ServletDecorator, Initial
{
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.setUser(secUser);
......
......@@ -14,10 +14,12 @@
SecUser secUser = null;
Candidate candidate = null;
SecUser loggedInUser = SecUser.getTXUser(transaction);
WorkFlowTemplate workFlowTemplate = null;
if(id != null && key != null)
{
job = Job.searchJobKey(transaction, Long.parseLong(id), key);
workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
process.setAttribute("Job", job);
}
......@@ -134,7 +136,7 @@
<oneit:form name="applyJob" method="post" enctype="multipart/form-data">
<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)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.toMap() %>"/>
......
......@@ -11,6 +11,7 @@
Job job = (Job) process.getAttribute("Job");
Candidate candidate = (Candidate) process.getAttribute("NewCandidate");
String confirmPage = WebUtils.getSamePageInRenderMode(request, "VerifyIdentity");
WorkFlowTemplate workFlowTemplate = null;
if(request.getParameter("JobID")!=null)
{
......@@ -19,6 +20,8 @@
Debug.assertion(job != null, "Job is null in applicant portal");
workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
if(request.getParameter("UserName")!=null)
{
String userName = (String) request.getParameter("UserName");
......@@ -129,7 +132,7 @@
</div>
<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">
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
</div>
......@@ -205,7 +208,7 @@
<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)
.mapEntry("Job",job)
.mapEntry("restartProcess", Boolean.TRUE)
......
......@@ -14,6 +14,8 @@
}
Debug.assertion(job != null, "Job is null in applicant portal");
WorkFlowTemplate workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
%>
<script type="text/javascript">
var interval;
......@@ -41,12 +43,12 @@
</div>
<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">
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
</div>
<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>
</oneit:dynIncluded>
\ No newline at end of file
......@@ -33,6 +33,7 @@
Article jobApplicationArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOB_APPLICATION);
String nextPage = jobApplicationArticle.getLink(request) + "?JobID="+ job.getID().toString();
String successPage = WebUtils.getSamePageInRenderMode(request, jobApplication.isDiversityIncluded() ? "DiversityQuestions" : "VerificationSent") + "&JobID=" + job.getID();
WorkFlowTemplate workFlowTemplate = job.getWorkFlowTemplate() != null ? job.getWorkFlowTemplate() : null;
if(!isDiversityComplete)
{
......@@ -318,7 +319,7 @@
</div>
</div>
<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)
.mapEntry("Job",job)
.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