Commit fa1cab68 by Nilu

C002

**After the verification email has been sent** and that message dispalyed, **Don't** show an email address field (or anything else!)  - [see Zeplin](https://zpl.io/bezgB8z) - this is **just** a confirmation screen

Don't show a checkmark for entered email address unless there’s a **full account** for it (post- email verification step)

If email address found, place the check mark (as usual) **but** then put cursor in password field
parent 9448c07a
...@@ -42,11 +42,11 @@ public class SendVerificationMailFP extends SaveFP ...@@ -42,11 +42,11 @@ public class SendVerificationMailFP extends SaveFP
CompanyUser companyUser = company.getAddedByUser(); CompanyUser companyUser = company.getAddedByUser();
SecUser secUser = companyUser.getUser(); SecUser secUser = companyUser.getUser();
BusinessObjectParser.assertFieldCondition(!Utils.emailExists(process.getTransaction(), secUser.getEmail()), secUser, SecUser.FIELD_Email, "emailExists", exceptions, true, request); BusinessObjectParser.assertFieldCondition(!Utils.emailExists(process.getTransaction(), secUser.getEmail(), false), secUser, SecUser.FIELD_Email, "emailExists", exceptions, true, request);
} }
else else
{ {
BusinessObjectParser.assertFieldCondition(!Utils.emailExists(process.getTransaction(), job.getEmail()), job, Job.FIELD_Email, "emailExists", exceptions, true, request); BusinessObjectParser.assertFieldCondition(!Utils.emailExists(process.getTransaction(), job.getEmail(), true), job, Job.FIELD_Email, "emailExists", exceptions, true, request);
} }
super.validate(process, submission, exceptions, params); super.validate(process, submission, exceptions, params);
...@@ -117,7 +117,9 @@ public class SendVerificationMailFP extends SaveFP ...@@ -117,7 +117,9 @@ public class SendVerificationMailFP extends SaveFP
if(secUser!=null) if(secUser!=null)
{ {
Debug.assertion(secUser.getExtension(Candidate.REFERENCE_Candidate)==null, "user available", email, secUser); Candidate tmpCandidate = secUser.getExtension(Candidate.REFERENCE_Candidate);
Debug.assertion((tmpCandidate == null || !tmpCandidate.getIsAccountVerified()), "user available", email, secUser);
} }
LogMgr.log(LOG, LogLevel.PROCESSING1, "Inside SendVerificationMailFP for send account verification mail for ", email); LogMgr.log(LOG, LogLevel.PROCESSING1, "Inside SendVerificationMailFP for send account verification mail for ", email);
......
...@@ -462,7 +462,7 @@ public class Job extends BaseJob ...@@ -462,7 +462,7 @@ public class Job extends BaseJob
{ {
SecUser user = SecUser.searchNAME(getTransaction(), getEmail().toLowerCase()); SecUser user = SecUser.searchNAME(getTransaction(), getEmail().toLowerCase());
if(user!=null && user.getExtension(Candidate.REFERENCE_Candidate)!=null) if(user!=null && user.getExtension(Candidate.REFERENCE_Candidate)!=null && user.getExtension(Candidate.REFERENCE_Candidate).getIsAccountVerified())
{ {
return Boolean.TRUE; return Boolean.TRUE;
} }
......
...@@ -333,11 +333,22 @@ public class Utils ...@@ -333,11 +333,22 @@ public class Utils
} }
public static Boolean emailExists(ObjectTransaction objTran, String email) public static Boolean emailExists(ObjectTransaction objTran, String email, boolean isCandidate)
{ {
if(email!= null) if(email!= null)
{ {
return SecUser.searchNAME(objTran, email.toLowerCase()) != null; SecUser secUser = SecUser.searchNAME(objTran, email.toLowerCase());
if(isCandidate)
{
Candidate candidate = secUser.getExtension(Candidate.REFERENCE_Candidate);
return candidate != null && candidate.getIsAccountVerified();
}
else
{
return secUser != null;
}
} }
return Boolean.FALSE; return Boolean.FALSE;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<RenderMode name="Page" preIncludeJSP="extensions/applicantportal/job_overview.jsp"/> <RenderMode name="Page" preIncludeJSP="extensions/applicantportal/job_overview.jsp"/>
<RenderMode name="SignIn" preIncludeJSP="extensions/applicantportal/sign_in.jsp"/> <RenderMode name="SignIn" preIncludeJSP="extensions/applicantportal/sign_in.jsp"/>
<RenderMode name="VerificationSent" preIncludeJSP="extensions/applicantportal/verification_sent.jsp"/>
<RenderMode name="ForgotPassword" preIncludeJSP="extensions/applicantportal/forgot_password.jsp"/> <RenderMode name="ForgotPassword" preIncludeJSP="extensions/applicantportal/forgot_password.jsp"/>
<RenderMode name="ResetPassword" preIncludeJSP="extensions/applicantportal/reset_password.jsp"/> <RenderMode name="ResetPassword" preIncludeJSP="extensions/applicantportal/reset_password.jsp"/>
<RenderMode name="ResetPasswordSent" preIncludeJSP="extensions/applicantportal/reset_password_sent.jsp"/> <RenderMode name="ResetPasswordSent" preIncludeJSP="extensions/applicantportal/reset_password_sent.jsp"/>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
ObjectTransaction objTran = process.getTransaction (); ObjectTransaction objTran = process.getTransaction ();
String currentPage = WebUtils.getSamePageInRenderMode(request, "SignIn"); String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent");
String nextPage = WebUtils.getArticleLink(request, objTran, WebUtils.JOB_APPLICATION, "Page"); String nextPage = WebUtils.getArticleLink(request, objTran, WebUtils.JOB_APPLICATION, "Page");
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
Candidate candidate = (Candidate) process.getAttribute("NewCandidate"); Candidate candidate = (Candidate) process.getAttribute("NewCandidate");
...@@ -158,10 +158,11 @@ ...@@ -158,10 +158,11 @@
</oneit:recalcClass> </oneit:recalcClass>
</div> </div>
<oneit:recalcClass htmlTag="div" classScript="job.isEmailFound() ? 'show': 'hide'" job="<%= job %>">
<oneit:recalcClass htmlTag="div" classScript="job.isEmailFound() ? 'show': 'hide'" job="<%= job %>" id="password-fileds">
<div class="form-group text-left"> <div class="form-group text-left">
<label>Password</label> <label>Password</label>
<oneit:ormInput obj="<%= job %>" type="password" attributeName="Password" cssClass="form-control second-style" /> <oneit:ormInput obj="<%= job %>" type="password" attributeName="Password" cssClass="form-control second-style" autofocus="true"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<oneit:button value="Forgot password?" name="gotoPage" cssClass="forgot-pass" skin="link" <oneit:button value="Forgot password?" name="gotoPage" cssClass="forgot-pass" skin="link"
...@@ -182,7 +183,7 @@ ...@@ -182,7 +183,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<oneit:button value="Send link" name="sendVerificationMail" cssClass="box-btn send-link-btn" <oneit:button value="Send link" name="sendVerificationMail" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
.mapEntry("Job",job) .mapEntry("Job",job)
.mapEntry("restartProcess", Boolean.TRUE) .mapEntry("restartProcess", Boolean.TRUE)
.mapEntry("attribNamesToRestore", Collections.singleton("Job")) .mapEntry("attribNamesToRestore", Collections.singleton("Job"))
......
<%@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>
\ No newline at end of file
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