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
CompanyUser companyUser = (CompanyUser) request.getAttribute("CompanyUser");
Boolean isSkip = CollectionUtils.equals((Boolean) request.getAttribute("Skip"), Boolean.TRUE);
if(companyUser != null && companyUser == company.getAddedByUser())
if(companyUser == company.getAddedByUser())
{
if(!isSkip)
{
......@@ -64,6 +64,11 @@ public class SendCompanyUserInvitesFP extends SaveFP
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);
}
......
......@@ -43,8 +43,8 @@ public class SendVerificationMailFP extends SaveFP
SecUser secUser = companyUser.getUser();
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.getConditionsAgreed()), companyUser, CompanyUser.FIELD_ConditionsAgreed, "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, "agreeTerms", exceptions, true, request);
}
else
{
......
......@@ -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.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.getConditionsAgreed()), candidate, Candidate.FIELD_ConditionsAgreed, "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, "agreeTerms", exceptions, true, request);
return super.validate(submission, exceptions);
}
......
......@@ -6,4 +6,6 @@
#invalidEmail = Invalid email address.
#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.
#insufficientCredit = Insufficient credit to open the job.
\ No newline at end of file
#insufficientCredit = Insufficient credit to open the job.
#agreeTerms = Please agree to the Terms & Conditions
#agreePrivacy = Please agree to the Privacy Policy
\ No newline at end of file
......@@ -12,7 +12,7 @@
CompanyUser companyUser = (CompanyUser) process.getAttribute("CompanyUser");
SecUser secUser = null;
Boolean socialLogin = Boolean.FALSE;
//to process company user verification
String id = request.getParameter("id");
String verifyKey = request.getParameter("key");
......@@ -56,10 +56,6 @@
Company company = companyUser.getCompany();
if(!invalid && CollectionUtils.equals(company.getAddedByUser(), companyUser))
{
}
process.setAttribute("Company", company);
%>
<oneit:script>
......@@ -80,6 +76,7 @@
$(document.body).addClass('bg-color');
$(document).ready(function() {
recalcFunction = setupRecalc ($("form#verify"), {'recalcOnError':true});
validate();
$('input').on('change keyup', function() { validate() });
interval = setInterval(function() { validate(); }, 500);
......@@ -117,7 +114,7 @@
<div class="main-box-layout login-box">
<oneit:dynInclude page="/extensions/adminportal/inc/company_user_data.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" CompanyUser="<%= companyUser %>"
IncludePrivacyStatements="<%= Boolean.FALSE%>"/>
IncludePrivacyStatements="<%= Boolean.FALSE %>"/>
<%
if(!socialLogin)
......@@ -145,7 +142,35 @@
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)
.mapEntry("CompanyUser", companyUser)
.mapEntry("nextPage", homePage)
......@@ -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>
</oneit:form>
</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