Commit ad116a09 by Nilu

S12516741 # Client - Incoming Issues (raised by Client) #Explicit consent required

parent b7fda702
...@@ -42,7 +42,7 @@ public class SendCompanyUserInvitesFP extends SaveFP ...@@ -42,7 +42,7 @@ public class SendCompanyUserInvitesFP extends SaveFP
CompanyUser companyUser = (CompanyUser) request.getAttribute("CompanyUser"); CompanyUser companyUser = (CompanyUser) request.getAttribute("CompanyUser");
Boolean isSkip = CollectionUtils.equals((Boolean) request.getAttribute("Skip"), Boolean.TRUE); Boolean isSkip = CollectionUtils.equals((Boolean) request.getAttribute("Skip"), Boolean.TRUE);
if(companyUser != null && companyUser == company.getAddedByUser()) if(companyUser == company.getAddedByUser())
{ {
if(!isSkip) if(!isSkip)
{ {
...@@ -64,6 +64,11 @@ public class SendCompanyUserInvitesFP extends SaveFP ...@@ -64,6 +64,11 @@ public class SendCompanyUserInvitesFP extends SaveFP
BusinessObjectParser.assertFieldCondition(company.getCompanyName()!=null, company, Company.FIELD_CompanyName, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(company.getCompanyName()!=null, company, Company.FIELD_CompanyName, "mandatory", exceptions, true, request);
} }
} }
else
{
BusinessObjectParser.assertFieldCondition(companyUser.isTrue(companyUser.getPrivacyPolicyAgreed()), companyUser, CompanyUser.FIELD_PrivacyPolicyAgreed, "agreePrivacy", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(companyUser.isTrue(companyUser.getConditionsAgreed()), companyUser, CompanyUser.FIELD_ConditionsAgreed, "agreeTerms", exceptions, true, request);
}
super.validate(process, submission, exceptions, params); super.validate(process, submission, exceptions, params);
} }
......
...@@ -43,8 +43,8 @@ public class SendVerificationMailFP extends SaveFP ...@@ -43,8 +43,8 @@ public class SendVerificationMailFP extends SaveFP
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()), secUser, SecUser.FIELD_Email, "emailExists", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(companyUser.isTrue(companyUser.getPrivacyPolicyAgreed()), companyUser, CompanyUser.FIELD_PrivacyPolicyAgreed, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(companyUser.isTrue(companyUser.getPrivacyPolicyAgreed()), companyUser, CompanyUser.FIELD_PrivacyPolicyAgreed, "agreePrivacy", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(companyUser.isTrue(companyUser.getConditionsAgreed()), companyUser, CompanyUser.FIELD_ConditionsAgreed, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(companyUser.isTrue(companyUser.getConditionsAgreed()), companyUser, CompanyUser.FIELD_ConditionsAgreed, "agreeTerms", exceptions, true, request);
} }
else else
{ {
......
...@@ -41,8 +41,8 @@ public class VerifyIdentityFP extends SaveFP ...@@ -41,8 +41,8 @@ public class VerifyIdentityFP extends SaveFP
BusinessObjectParser.assertFieldCondition(secUser.getFirstName() != null, secUser, SecUser.FIELD_FirstName, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(secUser.getFirstName() != null, secUser, SecUser.FIELD_FirstName, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(secUser.getLastName() != null, secUser, SecUser.FIELD_LastName, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(secUser.getLastName() != null, secUser, SecUser.FIELD_LastName, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getPrivacyPolicyAgreed()), candidate, Candidate.FIELD_PrivacyPolicyAgreed, "mandatory", 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, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getConditionsAgreed()), candidate, Candidate.FIELD_ConditionsAgreed, "agreeTerms", exceptions, true, request);
return super.validate(submission, exceptions); return super.validate(submission, exceptions);
} }
......
...@@ -6,4 +6,6 @@ ...@@ -6,4 +6,6 @@
#invalidEmail = Invalid email address. #invalidEmail = Invalid email address.
#emailChangeVefified = Your email address has been successfully changed and you can now use new email address when signing in. #emailChangeVefified = Your email address has been successfully changed and you can now use new email address when signing in.
#mandatoryCardDetails = Please enter card details to open the job. #mandatoryCardDetails = Please enter card details to open the job.
#insufficientCredit = Insufficient credit to open the job. #insufficientCredit = Insufficient credit to open the job.
\ No newline at end of file #agreeTerms = Please agree to the Terms & Conditions
#agreePrivacy = Please agree to the Privacy Policy
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
CompanyUser companyUser = (CompanyUser) process.getAttribute("CompanyUser"); CompanyUser companyUser = (CompanyUser) process.getAttribute("CompanyUser");
SecUser secUser = null; SecUser secUser = null;
Boolean socialLogin = Boolean.FALSE; Boolean socialLogin = Boolean.FALSE;
//to process company user verification //to process company user verification
String id = request.getParameter("id"); String id = request.getParameter("id");
String verifyKey = request.getParameter("key"); String verifyKey = request.getParameter("key");
...@@ -56,10 +56,6 @@ ...@@ -56,10 +56,6 @@
Company company = companyUser.getCompany(); Company company = companyUser.getCompany();
if(!invalid && CollectionUtils.equals(company.getAddedByUser(), companyUser))
{
}
process.setAttribute("Company", company); process.setAttribute("Company", company);
%> %>
<oneit:script> <oneit:script>
...@@ -80,6 +76,7 @@ ...@@ -80,6 +76,7 @@
$(document.body).addClass('bg-color'); $(document.body).addClass('bg-color');
$(document).ready(function() { $(document).ready(function() {
recalcFunction = setupRecalc ($("form#verify"), {'recalcOnError':true});
validate(); validate();
$('input').on('change keyup', function() { validate() }); $('input').on('change keyup', function() { validate() });
interval = setInterval(function() { validate(); }, 500); interval = setInterval(function() { validate(); }, 500);
...@@ -117,7 +114,7 @@ ...@@ -117,7 +114,7 @@
<div class="main-box-layout login-box"> <div class="main-box-layout login-box">
<oneit:dynInclude page="/extensions/adminportal/inc/company_user_data.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" CompanyUser="<%= companyUser %>" <oneit:dynInclude page="/extensions/adminportal/inc/company_user_data.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" CompanyUser="<%= companyUser %>"
IncludePrivacyStatements="<%= Boolean.FALSE%>"/> IncludePrivacyStatements="<%= Boolean.FALSE %>"/>
<% <%
if(!socialLogin) if(!socialLogin)
...@@ -145,7 +142,35 @@ ...@@ -145,7 +142,35 @@
else else
{ {
%> %>
<oneit:button value="Create my account" name="sendCompanyUserInvites" cssClass="box-btn verify-btn"
<div class="form-group text-left">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= companyUser %>" id="privacy-policy-agreed" attributeName="PrivacyPolicyAgreed" type="checkbox" />
<oneit:recalcClass htmlTag="span" classScript="companyUser.showPrivacyPolicyAgreed() ? 'checked': 'unchecked'" companyUser="<%= companyUser %>">
<label for="privacy-policy-agreed">
<oneit:label GUIName="I have read and agree to the " />
<a href="https://www.talentology.com/privacy/" target="_blank" class="privacy-link">Privacy Policy</a>
</label>
</oneit:recalcClass>
</div>
</div>
</div>
<div class="form-group text-left">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= companyUser %>" id="conditions-agreed" attributeName="ConditionsAgreed" type="checkbox" />
<oneit:recalcClass htmlTag="span" classScript="companyUser.showConditionsAgreed() ? 'checked': 'unchecked'" companyUser="<%= companyUser %>">
<label for="conditions-agreed">
<oneit:label GUIName="I have read and agree to the " />
<a href="https://www.talentology.com/terms-of-service/" target="_blank" class="privacy-link">Terms & Conditions</a>
</label>
</oneit:recalcClass>
</div>
</div>
</div>
<oneit:button value="Sign up" name="sendCompanyUserInvites" cssClass="box-btn verify-btn"
requestAttribs="<%= CollectionUtils.mapEntry("socialLogin", socialLogin) requestAttribs="<%= CollectionUtils.mapEntry("socialLogin", socialLogin)
.mapEntry("CompanyUser", companyUser) .mapEntry("CompanyUser", companyUser)
.mapEntry("nextPage", homePage) .mapEntry("nextPage", homePage)
...@@ -153,11 +178,6 @@ ...@@ -153,11 +178,6 @@
<% <%
} }
%> %>
<div class="box-label" style="padding-top: 20px;">
By selecting 'Create my account' I agree to Talentology's
<a href="https://www.talentology.com/privacy/" target="_blank">privacy policy</a> and
<a href="https://www.talentology.com/terms-of-service/" target="_blank">terms of service</a>
</div>
</div> </div>
</oneit:form> </oneit:form>
</oneit:dynIncluded> </oneit:dynIncluded>
......
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