Commit 3a0c6d4a by chenith Committed by Harsh Shah

Introduced signup/new company account creation in admin portal.

Added account verification email for company.
parent 3de71597
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
<column name="forgot_password_key" type="String" nullable="true" length="10"/> <column name="forgot_password_key" type="String" nullable="true" length="10"/>
<column name="role_type" type="String" nullable="true" length="200"/> <column name="role_type" type="String" nullable="true" length="200"/>
<column name="phone" type="String" nullable="true" length="30"/> <column name="phone" type="String" nullable="true" length="30"/>
<column name="verification_mail_send_date" type="Date" nullable="true"/>
<column name="verification_key" type="String" nullable="true" length="10"/>
<column name="is_account_verified" type="Boolean" nullable="true"/>
<column name="user_id" type="Long" length="11" nullable="true"/> <column name="user_id" type="Long" length="11" nullable="true"/>
<column name="company_id" type="Long" length="11" nullable="true"/> <column name="company_id" type="Long" length="11" nullable="true"/>
</NODE> </NODE>
......
...@@ -12,6 +12,9 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -12,6 +12,9 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_key varchar(10) NULL, forgot_password_key varchar(10) NULL,
role_type varchar(200) NULL, role_type varchar(200) NULL,
phone varchar(30) NULL, phone varchar(30) NULL,
verification_mail_send_date datetime NULL,
verification_key varchar(10) NULL,
is_account_verified char(1) NULL,
user_id numeric(12) NULL, user_id numeric(12) NULL,
company_id numeric(12) NULL company_id numeric(12) NULL
); );
......
...@@ -13,6 +13,9 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -13,6 +13,9 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_key varchar2(10) NULL, forgot_password_key varchar2(10) NULL,
role_type varchar2(200) NULL, role_type varchar2(200) NULL,
phone varchar2(30) NULL, phone varchar2(30) NULL,
verification_mail_send_date date NULL,
verification_key varchar2(10) NULL,
is_account_verified char(1) NULL,
user_id number(12) NULL, user_id number(12) NULL,
company_id number(12) NULL company_id number(12) NULL
); );
......
...@@ -13,6 +13,9 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -13,6 +13,9 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_key varchar(10) NULL, forgot_password_key varchar(10) NULL,
role_type varchar(200) NULL, role_type varchar(200) NULL,
phone varchar(30) NULL, phone varchar(30) NULL,
verification_mail_send_date timestamp NULL,
verification_key varchar(10) NULL,
is_account_verified char(1) NULL,
user_id numeric(12) NULL, user_id numeric(12) NULL,
company_id numeric(12) NULL company_id numeric(12) NULL
); );
......
...@@ -12,6 +12,7 @@ import oneit.net.LoopbackHTTP; ...@@ -12,6 +12,7 @@ import oneit.net.LoopbackHTTP;
import oneit.objstore.ObjectTransaction; import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException; import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser; import oneit.objstore.parser.BusinessObjectParser;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.security.SecUser; import oneit.security.SecUser;
import oneit.servlets.forms.*; import oneit.servlets.forms.*;
import oneit.servlets.process.*; import oneit.servlets.process.*;
...@@ -31,10 +32,23 @@ public class SendVerificationMailFP extends SaveFP ...@@ -31,10 +32,23 @@ public class SendVerificationMailFP extends SaveFP
@Override @Override
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
Job job = (Job) request.getAttribute("Job"); Job job = (Job) request.getAttribute("Job");
Company company = (Company) request.getAttribute("Company");
Debug.assertion(company != null || job!=null, "BO not avaialble");
BusinessObjectParser.assertFieldCondition(!job.isEmailFound(), job, Job.FIELD_Email, "emailExists", exceptions, true, request); if(company!=null)
{
CompanyUser companyUser = company.getAddedByUser();
SecUser secUser = companyUser.getUser();
BusinessObjectParser.assertFieldCondition(!isEmailFound(process.getTransaction(), secUser.getEmail()), secUser, SecUser.FIELD_Email, "emailExists", exceptions, true, request);
}
else
{
BusinessObjectParser.assertFieldCondition(!job.isEmailFound(), job, Job.FIELD_Email, "emailExists", exceptions, true, request);
}
super.validate(process, submission, exceptions, params); super.validate(process, submission, exceptions, params);
} }
...@@ -46,33 +60,56 @@ public class SendVerificationMailFP extends SaveFP ...@@ -46,33 +60,56 @@ public class SendVerificationMailFP extends SaveFP
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
ObjectTransaction objTran = process.getTransaction(); ObjectTransaction objTran = process.getTransaction();
Job job = (Job) request.getAttribute("Job"); Job job = (Job) request.getAttribute("Job");
String email = job.getEmail(); Company company = (Company) request.getAttribute("Company");
Debug.assertion(email != null, "Email not avaialble"); if(company!=null)
{
LogMgr.log(LOG, LogLevel.PROCESSING1, "Started to send varification email.", job , email); CompanyUser companyUser = company.getAddedByUser();
SecUser secUser = companyUser.getUser();
SecUser secUser = SecUser.searchNAME(objTran, email);
Debug.assertion(secUser == null, "user available", email);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Inside SendVerificationMailFP for send account verification mail for ", email); LogMgr.log(LOG, LogLevel.PROCESSING1, "Started to send varification email.", companyUser);
secUser.setUserName(secUser.getEmail().toLowerCase());
secUser.setAttribute("md5:" + SecUser.FIELD_Password, DEFAULT_PASSWORD);
secUser.addRole(Utils.getRole(Utils.ROLE_CLIENT, objTran));
LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", secUser);
SecUser newSecUser = SecUser.createSecUser(objTran); sendVerificationMail(companyUser, request);
newSecUser.setUserName(email.toLowerCase()); LogMgr.log(LOG, LogLevel.PROCESSING1, "End of sending varification email.", companyUser);
newSecUser.setAttribute("md5:" + SecUser.FIELD_Password, DEFAULT_PASSWORD); }
else
{
String email = job.getEmail();
LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", newSecUser); Debug.assertion(email != null, "Email not avaialble");
email = email.toLowerCase();
newSecUser.addRole(Utils.getRole(Utils.ROLE_APPLICANT, objTran)); LogMgr.log(LOG, LogLevel.PROCESSING1, "Started to send varification email.", job , email);
Candidate candidate = newSecUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate); SecUser secUser = SecUser.searchNAME(objTran, email);
sendVerificationMail(candidate, job, request); Debug.assertion(secUser == null, "user available", email);
request.setAttribute("nextPage", request.getAttribute("nextPage") + "&JobID=" + job.getID()); LogMgr.log(LOG, LogLevel.PROCESSING1, "Inside SendVerificationMailFP for send account verification mail for ", email);
SecUser newSecUser = SecUser.createSecUser(objTran);
newSecUser.setUserName(email);
newSecUser.setAttribute("md5:" + SecUser.FIELD_Password, DEFAULT_PASSWORD);
newSecUser.addRole(Utils.getRole(Utils.ROLE_APPLICANT, objTran));
Candidate candidate = newSecUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate);
LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", newSecUser);
sendVerificationMail(candidate, job, request);
request.setAttribute("nextPage", request.getAttribute("nextPage") + "&JobID=" + job.getID());
}
return super.processForm(process, submission, params); return super.processForm(process, submission, params);
} }
...@@ -127,4 +164,60 @@ public class SendVerificationMailFP extends SaveFP ...@@ -127,4 +164,60 @@ public class SendVerificationMailFP extends SaveFP
LogMgr.log(LOG, LogLevel.PROCESSING1, "Call from " + SendVerificationMailFP.class + ". Account is already verified for candidate :: ", candidate); LogMgr.log(LOG, LogLevel.PROCESSING1, "Call from " + SendVerificationMailFP.class + ". Account is already verified for candidate :: ", candidate);
} }
} }
protected void sendVerificationMail(CompanyUser companyUser, HttpServletRequest request) throws BusinessException
{
if(companyUser.getIsAccountVerified()!=Boolean.TRUE)
{
try
{
LogMgr.log(LOG, LogLevel.PROCESSING1, "Sending verification mail from SendVerificationMailFP to :: ", companyUser);
Article verificationArticle = WebUtils.getArticleByShortCut(companyUser.getTransaction(), WebUtils.COMPANY_ACCOUNT_VERIFICATION);
RandomStringGen random = new RandomStringGen();
//set verification key and send mail time
companyUser.setVerificationKey(random.generateAlphaNum(6));
companyUser.setVerificationMailSendDate(new Date());
String link = LoopbackHTTP.getRemoteAccessURL(request)
+ verificationArticle.getLink(request, CollectionUtils.EMPTY_MAP, "/")
+ "?id=" + companyUser.getID()
+ "&key=" + companyUser.getVerificationKey();
Map defaultParams = CollectionUtils.mapEntry("link", link).toMap();
ObjectTransform transform = Utils.createCompoundTransform(defaultParams, companyUser);
Utils.sendMail(emailer, transform, new String[]{companyUser.getUser().getEmail()}, null, companyUser);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Sent verification mail successfully from " + SendVerificationMailFP.class + " to :: ", companyUser);
}
catch (ConfigurableEmailerException ex)
{
LogMgr.log(LOG, LogLevel.SYSTEMERROR1, ex, "Error occured while sending mail for Candidate :: " + companyUser);
throw new BusinessException("We are unable to send mail. Please try again or contact Talentology for more details.");
}
}
else
{
LogMgr.log(LOG, LogLevel.PROCESSING1, "Call from " + SendVerificationMailFP.class + ". Account is already verified for candidate :: ", companyUser);
}
}
private Boolean isEmailFound(ObjectTransaction objTran, String email)
{
if(email!=null)
{
SecUser user = SecUser.searchNAME(objTran, email.toLowerCase());
if(user!=null) //&& user.getExtension(CompanyUser.REFERENCE_CompanyUser)!=null
{
return Boolean.TRUE;
}
}
return Boolean.FALSE;
}
} }
\ No newline at end of file
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
<ATTRIB name="ForgotPasswordKey" type="String" dbcol="forgot_password_key" length="10"/> <ATTRIB name="ForgotPasswordKey" type="String" dbcol="forgot_password_key" length="10"/>
<ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/> <ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Phone" type="String" dbcol="phone" mandatory="false" length="30" /> <ATTRIB name="Phone" type="String" dbcol="phone" mandatory="false" length="30" />
<ATTRIB name="VerificationMailSendDate" type="Date" dbcol="verification_mail_send_date" />
<ATTRIB name="VerificationKey" type="String" dbcol="verification_key" length="10"/>
<ATTRIB name="IsAccountVerified" type="Boolean" dbcol="is_account_verified" defaultValue="Boolean.FALSE"/>
<SINGLEREFERENCE name="User" type="SecUser" dbcol="user_id" backreferenceName="Extensions" inSuper='TRUE'/> <SINGLEREFERENCE name="User" type="SecUser" dbcol="user_id" backreferenceName="Extensions" inSuper='TRUE'/>
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" backreferenceName="Users"/> <SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" backreferenceName="Users"/>
...@@ -22,6 +25,11 @@ ...@@ -22,6 +25,11 @@
<SEARCH type="All" paramFilter="oneit_sec_user_extension.object_id is not null" > <SEARCH type="All" paramFilter="oneit_sec_user_extension.object_id is not null" >
</SEARCH> </SEARCH>
<SEARCH type="IdPin" paramFilter="oneit_sec_user_extension.object_id is not null" singleton="TRUE">
<PARAM name="ID" type="Long" paramFilter="object_id = ${ID} " />
<PARAM name="Pin" type="String" paramFilter="verification_key = ${Pin}" />
</SEARCH>
</BUSINESSCLASS> </BUSINESSCLASS>
</ROOT> </ROOT>
\ No newline at end of file
...@@ -42,6 +42,7 @@ public class WebUtils ...@@ -42,6 +42,7 @@ public class WebUtils
public static final String VIEW_APPLICANTS_GRID = "ViewApplicantsGrid"; public static final String VIEW_APPLICANTS_GRID = "ViewApplicantsGrid";
public static final String APPLICANT_ACCOUNT_VERIFICATION = "ApplicantAccountVerification"; public static final String APPLICANT_ACCOUNT_VERIFICATION = "ApplicantAccountVerification";
public static final String RESET_PASSWORD_ARTICLE = "ResetPasswordEmail"; public static final String RESET_PASSWORD_ARTICLE = "ResetPasswordEmail";
public static final String COMPANY_ACCOUNT_VERIFICATION = "CompanyAccountVerification";
public static String getArticleLink(HttpServletRequest request, ObjectTransaction objTran, String articleShortcut, String renderMode) public static String getArticleLink(HttpServletRequest request, ObjectTransaction objTran, String articleShortcut, String renderMode)
......
...@@ -4764,3 +4764,12 @@ label, label .label-title span { ...@@ -4764,3 +4764,12 @@ label, label .label-title span {
font-size: 20px; font-size: 20px;
} }
/* End of Clients HT010 */ /* End of Clients HT010 */
.hire-the-right-candi {
height: 24px;
font-family: Usual-Medium;
font-size: 20px;
font-weight: 500;
text-align: center;
color: #4a4a4a;
}
\ No newline at end of file
...@@ -66,6 +66,13 @@ ...@@ -66,6 +66,13 @@
<FORM name="*.resetPassword" factory="Participant" class="performa.form.ResetPasswordFP"/> <FORM name="*.resetPassword" factory="Participant" class="performa.form.ResetPasswordFP"/>
</NODE> </NODE>
<NODE name="sign_up_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/>
<FORM name="*.send" factory="Participant" class="performa.form.SendVerificationMailFP">
<AccountVerificationEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="CompanyAccountVerificationMail"/>
</FORM>
</NODE>
<NODE name="ORMErrorConfig::ADMIN_PORTAL" factory="Participant" class="oneit.servlets.forms.ErrorReportConfig"> <NODE name="ORMErrorConfig::ADMIN_PORTAL" factory="Participant" class="oneit.servlets.forms.ErrorReportConfig">
<format item="field.*.error.pageHeader_performa_errorPrefix"> <format item="field.*.error.pageHeader_performa_errorPrefix">
<![CDATA[<div class="error-message message-common"><img src="${contextRoot}/images/error-alert.png" class="alert-icon" /><span class="message-txt" style="font-weight: bold">${translateLabel:Errors_Occurred:Errors occurred, please correct them and try again}</span><br/>]]> <![CDATA[<div class="error-message message-common"><img src="${contextRoot}/images/error-alert.png" class="alert-icon" /><span class="message-txt" style="font-weight: bold">${translateLabel:Errors_Occurred:Errors occurred, please correct them and try again}</span><br/>]]>
......
...@@ -84,6 +84,16 @@ ...@@ -84,6 +84,16 @@
</NODE> </NODE>
</MAP> </MAP>
<MAP value="COMPANY_ACCOUNT_VERIFICATION" description="Company Account Verification" TemplatePage="dynamic_content_form.jsp">
<NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration">
<INHERITS nodename="StandardJSP"/>
<RenderMode name="Page" preIncludeJSP="extensions/adminportal/verify_company.jsp"/>
<RenderMode name="AuthError" preIncludeJSP="extensions/adminportal/auth_error.jsp"/>
</NODE>
</MAP>
</NODE> </NODE>
<NODE name="StandardJSP::AdminPortal"> <NODE name="StandardJSP::AdminPortal">
......
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<oneit:dynIncluded>
<div style="width: 50%; margin: 0px auto 0px auto; text-align: center">
<h3>Authentication Error</h3>
<p><span>Access expired.</span></p>
</div>
</oneit:dynIncluded>
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%@ page import="oneit.security.SecUser"%>
<oneit:dynIncluded>
<%
CompanyUser companyUser = (CompanyUser) getData(request, "CompanyUser");
Debug.assertion(companyUser != null, "Invalid CompanyUser in admin portal");
SecUser secUser = companyUser.getUser();
Company company = companyUser.getCompany();
Boolean readOnly = companyUser.getStatus()!=ObjectStatus.NEW;
%>
<div class="form-group text-left">
<label>Email Address</label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control" style="text-transform: lowercase" required="true" readOnly="<%= readOnly? "true" : "false"%>"/>
</div>
<div class="row">
<div class="form-group text-left col-sm-6 col-xs-12">
<label><oneit:ormlabel obj="<%= secUser %>" field="FirstName" /></label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="FirstName" cssClass="form-control second-style" required="true" />
</div>
<div class="form-group text-left col-sm-6 col-xs-12">
<label><oneit:ormlabel obj="<%= secUser %>" field="LastName" /></label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="LastName" cssClass="form-control second-style" required="true"/>
</div>
</div>
<div class="form-group text-left">
<label><oneit:ormlabel obj="<%= companyUser %>" field="Phone" /></label>
<oneit:ormInput obj="<%= companyUser %>" type="text" attributeName="Phone" cssClass="form-control" required="true"/>
</div>
<div class="form-group text-left">
<label>Company</label>
<oneit:ormInput obj="<%= company %>" type="text" attributeName="CompanyName" cssClass="form-control" required="true"/>
</div>
</oneit:dynIncluded>
...@@ -68,6 +68,11 @@ ...@@ -68,6 +68,11 @@
<oneit:button value="Sign in" name="login" cssClass="box-btn login-btn" <oneit:button value="Sign in" name="login" cssClass="box-btn login-btn"
requestAttribs="<%= CollectionUtils.EMPTY_MAP%>"/> requestAttribs="<%= CollectionUtils.EMPTY_MAP%>"/>
</div> </div>
<div class="form-group">
<oneit:button value="Dont have an account? Create account" name="gotoPage" cssClass="forgot-pass" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "sign_up.jsp")
.toMap() %>"></oneit:button>
</div>
</oneit:form> </oneit:form>
<div class="box-br-line"><span></span></div> <div class="box-br-line"><span></span></div>
<div class="box-label">Sign in using your social network of choice</div> <div class="box-label">Sign in using your social network of choice</div>
......
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%! protected String getName (ServletConfig config) { return "sign_up_jsp"; } %>
<%@ include file="inc/htmlheader_nopriv.jsp" %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
Boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Company", Company.REFERENCE_Company);
Company company = (Company) process.getAttribute("Company");
SecUser secUser = null;
CompanyUser companyUser = company.getAddedByUser();
if(companyUser==null)
{
secUser = SecUser.createSecUser(objTran);
companyUser = secUser.getExtensionOrCreate(CompanyUser.REFERENCE_CompanyUser);
company.setAddedByUser(companyUser);
companyUser.setCompany(company);
}
secUser = companyUser.getUser();
if(toRedirect)
{
%><%@include file="/saferedirect.jsp"%><%
}
Debug.assertion(companyUser != null, "CompanyUser is null in admin portal");
%>
<script type="text/javascript">
$(document).ready(function() {
validate();
$('input').on('change keyup', function() { validate() });
});
function validate() {
var empty = false;
$('input[required]').each(function() {
if ( $.trim($( this ).val()) == '') {
empty = true;
if ($( this ).css('background-color') == 'rgb(250, 255, 189)') {
empty = false;
}
}
});
if (empty) {
$('.send-btn').attr('disabled', 'disabled');
} else {
$('.send-btn').removeAttr('disabled');
}
}
</script>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<div class="hire-the-right-candi">Hire the right candidate</div>
<div>&nbsp;</div>
<oneit:form name="sign_up" method="post">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="main-box-layout login-box">
<oneit:dynInclude page="/extensions/adminportal/inc/company_user_data.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" CompanyUser="<%= companyUser %>"/>
<oneit:button value="Send" name="send" cssClass="box-btn send-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "sign_in.jsp?sent=true")
.mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.mapEntry("Company", company)
.toMap() %>"/>
</div>
</oneit:form>
<%@ include file="inc/htmlfooter_nopriv.jsp" %>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<OBJECTS xmlns:oneit="http://www.1iT.com.au" name="">
<NODE factory="Vector" name="Script"><NODE class="oneit.appservices.upgrade.cms.CMSArticleUpdateOperation" factory="Participant" name="Company Account Verification">
<createSpecificIdentifier factory='String' value='VV5IJAZF8G4KUHHN8OPS1G57IUY4SZ'/>
<articleIdentifiers factory="Array" class="java.lang.String">
<NODE factory="String" value="VV5IJAZF8G4KUHHN8OPS1G57IUY4SZ"/>
</articleIdentifiers>
<createdLabel factory="String" value="VV5IJAZF8G4KUHHN8OPS1G57IUY4SZ"/>
<newParentCategory factory="String" value="created:5L47UE8LMI51VOIOS8YTLLVQAT5NTW"/>
<articleAttributeChanges factory="Map">
<NODE name="Additional CSS Class" factory="Null"/>
<NODE name="Exclude From Sitemap" factory="Boolean" value="false"/>
<NODE name="Exclude from SEO Indexing" factory="Boolean" value="false"/>
<NODE name="Add Brackline Separator" factory="Boolean" value="false"/>
<NODE name="On Top Menu" factory="Boolean" value="false"/>
<NODE name="On Footer Left" factory="Boolean" value="false"/>
<NODE name="Menu Title" factory="Null"/>
<NODE name="On Footer Menu" factory="Boolean" value="false"/>
<NODE name="Exclude From Search" factory="Boolean" value="false"/>
<NODE name="Menu Icon CSS" factory="Null"/>
<NODE name="On Left Menu" factory="Boolean" value="false"/>
<NODE name="Shortcuts" factory="String" value="CompanyAccountVerification"/>
<NODE name="Exclude From Navigation" factory="Boolean" value="false"/>
<NODE name="On Footer Right" factory="Boolean" value="false"/>
</articleAttributeChanges>
<ormAttributeChanges factory="Map">
<NODE name="PublishDate" factory="Date" value="2017-06-20 00:00:00"/>
<NODE name="WithdrawDate" factory="Date" value="2067-06-20 13:00:00"/>
<NODE name="Title" factory="String" value="Company Account Verification"/>
<NODE name="ShortTitle" factory="String" value="Account Verification"/>
<NODE name="SortOrder" factory="Integer" value="-36831674"/>
<NODE name="Type" factory="Enumerated" class="oneit.business.content.ArticleType" value="ARTICLE"/>
<NODE name="Template" factory="Enumerated" class="oneit.business.content.ArticleTemplate" value="COMPANY_ACCOUNT_VERIFICATION"/>
</ormAttributeChanges>
<content factory="Map"> <NODE name="Body" factory="Map">
<NODE name="Content" factory="String"><![CDATA[<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="HTML Tidy, see www.w3.org" name="generator">
<title></title>
</head>
<body>
<p>&nbsp;</p>
</body>
</html>
]]></NODE>
<NODE name="TransformedContent" factory="String"><![CDATA[<p>&nbsp;</p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
<NODE name="Synopsis" factory="Map">
<NODE name="Content" factory="String"><![CDATA[
<p></p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
</content>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<OBJECTS xmlns:oneit="http://www.1iT.com.au" name="">
<NODE factory="Vector" name="Script"><NODE class="oneit.appservices.upgrade.cms.CMSArticleUpdateOperation" factory="Participant" name="Company Account Verification Mail">
<createSpecificIdentifier factory='String' value='P1U6WNGWG39B7X9W9Q7MX0Q8YAZGOB'/>
<articleIdentifiers factory="Array" class="java.lang.String">
<NODE factory="String" value="P1U6WNGWG39B7X9W9Q7MX0Q8YAZGOB"/>
</articleIdentifiers>
<createdLabel factory="String" value="P1U6WNGWG39B7X9W9Q7MX0Q8YAZGOB"/>
<newParentCategory factory="String" value="RESOURCE_LIBRARY"/>
<articleAttributeChanges factory="Map">
<NODE name="EmailTo" factory="Null"/>
<NODE name="EmailFrom" factory="String" value="info@talentology.com.au"/>
<NODE name="EmailSubject" factory="String" value="Verify your email"/>
<NODE name="Shortcuts" factory="String" value="CompanyAccountVerificationMail"/>
<NODE name="EmailCC" factory="Null"/>
<NODE name="EmailBCC" factory="Null"/>
</articleAttributeChanges>
<ormAttributeChanges factory="Map">
<NODE name="PublishDate" factory="Date" value="2016-02-05 00:00:00"/>
<NODE name="WithdrawDate" factory="Date" value="2066-02-05 16:00:00"/>
<NODE name="Title" factory="String" value="Company Account Verification Mail"/>
<NODE name="ShortTitle" factory="String" value="Reset Code Email"/>
<NODE name="SortOrder" factory="Integer" value="-200926"/>
<NODE name="Type" factory="Enumerated" class="oneit.business.content.ArticleType" value="ARTICLE"/>
<NODE name="Template" factory="Enumerated" class="oneit.business.content.ArticleTemplate" value="EMAIL_TEMPLATE"/>
</ormAttributeChanges>
<content factory="Map"> <NODE name="EmailBody" factory="Map">
<NODE name="Content" factory="String"><![CDATA[<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="HTML Tidy, see www.w3.org" name="generator">
<title></title>
</head>
<body>
<p>Hello,</p>
<p>Welcome to Talantology! Your account has been created.</p>
<p>To verify this account please <a href="${link}">click here</a>. After verifying your account, you can create jobs.</p>
<p>Thank You.</p>
</body>
</html>
]]></NODE>
<NODE name="TransformedContent" factory="String"><![CDATA[<p>Hello,</p><p>Welcome to Talantology! Your account has been created.</p><p>To verify this account please <a href="${link}">click here</a>. After verifying your account, you can create jobs.</p><p>Thank You.</p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
<NODE name="" factory="Map">
<NODE name="Content" factory="String"><![CDATA[
<p></p>
]]></NODE>
<NODE name="IncludeContent" factory="Boolean" value="true"/>
</NODE>
</content>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<%@ 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" %>
<%@ include file="inc/htmlheader_nopriv.jsp" %>
<oneit:dynIncluded>
<%
String nextPage = WebUtils.getArticleLink(request, process.getTransaction (), WebUtils.JOB_APPLICATION, "Page");
CompanyUser companyUser = (CompanyUser) process.getAttribute("CompanyUser");
SecUser secUser = null;
//to process company user verification
String id = request.getParameter("id");
String key = request.getParameter("key");
Boolean isVerify = Boolean.FALSE;
if(id!=null && key!=null)
{
isVerify = Boolean.TRUE;
companyUser = CompanyUser.searchIdPin(transaction, Long.parseLong(id), key);
if(companyUser!=null && companyUser.getIsAccountVerified()!=Boolean.TRUE)
{
secUser = companyUser.getUser();
process.setAttribute("CompanyUser", companyUser);
}
}
else
{
response.sendRedirect(WebUtils.getSamePageInRenderMode(request, "AuthError"));
}
Debug.assertion(companyUser != null, "Invalid CompanyUser in admin portal");
%>
<script type="text/javascript">
$(document.body).addClass('bg-color');
$(document).ready(function() {
validate();
$('input').on('change keyup', function() { validate() });
interval = setInterval(function() { validate(); }, 500);
});
function validate() {
var empty = false;
$('input[required]').each(function() {
if ($( this ).val() == '') {
empty = true;
if ($( this ).css('background-color') == 'rgb(250, 255, 189)') {
empty = false;
}
}
});
if (empty) {
$('.verify-btn').attr('disabled', 'disabled');
} else {
$('.verify-btn').removeAttr('disabled');
clearInterval(interval);
}
}
</script>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<oneit:form name="verify" method="post">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="main-box-layout login-box">
<oneit:dynInclude page="/extensions/adminportal/inc/company_user_data.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" CompanyUser="<%= companyUser %>"/>
<oneit:button value="Verify and login" name="xxx" cssClass="box-btn send-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "sign_in.jsp").toMap() %>"/>
</div>
</oneit:form>
</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