Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
8610af15
Commit
8610af15
authored
Aug 11, 2017
by
Nilu
Committed by
Harsh Shah
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issues in C008, C004
parent
ebc0974d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
54 deletions
+109
-54
SaveAndExitWorkStypeFP.java
cmsWebApp/src/performa/form/SaveAndExitWorkStypeFP.java
+39
-0
Job.java
cmsWebApp/src/performa/orm/Job.java
+1
-1
JobApplication.java
cmsWebApp/src/performa/orm/JobApplication.java
+31
-16
CustomServlets_applicantPortal.xml
...nsions/applicantportal/CustomServlets_applicantPortal.xml
+1
-0
job_match_assessment.jsp
...broot/extensions/applicantportal/job_match_assessment.jsp
+29
-31
submit_application.jsp
...webroot/extensions/applicantportal/submit_application.jsp
+8
-6
No files found.
cmsWebApp/src/performa/form/SaveAndExitWorkStypeFP.java
0 → 100644
View file @
8610af15
package
performa
.
form
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogMgr
;
import
oneit.objstore.StorageException
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.servlets.forms.SuccessfulResult
;
import
oneit.servlets.process.ORMProcessState
;
import
oneit.servlets.process.SaveFP
;
import
oneit.utils.BusinessException
;
import
performa.orm.Answer
;
import
performa.orm.JobApplication
;
public
class
SaveAndExitWorkStypeFP
extends
SaveFP
{
@Override
public
SuccessfulResult
processForm
(
ORMProcessState
process
,
SubmissionDetails
submission
,
Map
params
)
throws
BusinessException
,
StorageException
{
HttpServletRequest
request
=
submission
.
getRequest
();
JobApplication
jobApplication
=
process
.
getAttribute
(
"JobApplication"
)
!=
null
?
(
JobApplication
)
process
.
getAttribute
(
"JobApplication"
)
:
(
JobApplication
)
request
.
getAttribute
(
"JobApplication"
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"In SaveAndExitWorkStypeFP saving job application: "
,
jobApplication
);
for
(
Answer
answer
:
jobApplication
.
getProfileAssessmentAnswersSet
())
{
if
(
answer
.
getAnswerNo
()
==
null
)
{
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"In SaveAndExitWorkStypeFP deleting ProfileAssessmentAnswer : "
,
answer
);
answer
.
delete
();
}
}
return
super
.
processForm
(
process
,
submission
,
params
);
}
}
\ No newline at end of file
cmsWebApp/src/performa/orm/Job.java
View file @
8610af15
...
@@ -62,7 +62,7 @@ public class Job extends BaseJob
...
@@ -62,7 +62,7 @@ public class Job extends BaseJob
if
(
getIncludeAssessmentCriteria
())
if
(
getIncludeAssessmentCriteria
())
{
{
context
.
check
(
getAssessmentCriteriasCount
()
>
0
,
this
,
MULTIPLEREFERENCE_AssessmentCriterias
,
"atleastOneRequirement"
);
context
.
check
(
getAssessmentCriteriasCount
()
>
0
,
this
,
FIELD_IncludeAssessmentCriteria
,
"atleastOneRequirement"
);
}
}
context
.
check
(
getSaveAssessmentTemplate
()
==
null
||
!
getSaveAssessmentTemplate
()
,
this
,
FIELD_AssessmentTemplateName
,
"saveTemplateFirst"
);
context
.
check
(
getSaveAssessmentTemplate
()
==
null
||
!
getSaveAssessmentTemplate
()
,
this
,
FIELD_AssessmentTemplateName
,
"saveTemplateFirst"
);
...
...
cmsWebApp/src/performa/orm/JobApplication.java
View file @
8610af15
...
@@ -116,32 +116,47 @@ public class JobApplication extends BaseJobApplication
...
@@ -116,32 +116,47 @@ public class JobApplication extends BaseJobApplication
}
}
public
boolean
initAssessmentAnswers
(
List
<
Question
>
allQ
uestions
)
throws
StorageException
,
FieldException
public
boolean
initAssessmentAnswers
(
List
<
Question
>
q
uestions
)
throws
StorageException
,
FieldException
{
{
boolean
redirect
=
false
;
boolean
redirect
=
false
;
List
<
Question
>
allQuestions
=
new
ArrayList
<>();
if
(
getProfileAssessmentAnswersCount
()
==
0
)
for
(
Question
question
:
questions
)
{
{
for
(
Question
question
:
allQuestions
)
allQuestions
.
add
(
question
);
{
redirect
=
true
;
Answer
answer
=
Answer
.
createAnswer
(
getTransaction
());
addToProfileAssessmentAnswers
(
answer
);
if
(
question
.
getRightQuestion
()
!=
null
)
answer
.
setQuestion
(
question
);
{
allQuestions
.
add
(
question
.
getRightQuestion
());
}
}
for
(
Question
question
:
allQuestions
)
{
boolean
available
=
false
;
if
(
question
.
getRightQuestion
()
!=
null
)
for
(
Answer
answer
:
getProfileAssessmentAnswersSet
())
{
if
(
question
.
equals
(
answer
.
getQuestion
()))
{
{
Answer
rightAnswer
=
Answer
.
createAnswer
(
getTransaction
());
available
=
true
;
break
;
addToProfileAssessmentAnswers
(
rightAnswer
);
rightAnswer
.
setQuestion
(
question
.
getRightQuestion
());
}
}
}
}
}
if
(!
available
)
{
Answer
answer
=
Answer
.
createAnswer
(
getTransaction
());
addToProfileAssessmentAnswers
(
answer
);
answer
.
setQuestion
(
question
);
redirect
=
true
;
}
}
return
redirect
;
return
redirect
;
}
}
public
Answer
getAnswerForQuestion
(
Question
question
)
throws
FieldException
public
Answer
getAnswerForQuestion
(
Question
question
)
throws
FieldException
{
{
Filter
filter
=
Answer
.
SearchByAll
().
andQuestion
(
new
EqualsFilter
<>(
question
));
Filter
filter
=
Answer
.
SearchByAll
().
andQuestion
(
new
EqualsFilter
<>(
question
));
...
...
cmsWebApp/webroot/extensions/applicantportal/CustomServlets_applicantPortal.xml
View file @
8610af15
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<FORM
name=
"*.completeApplication"
factory=
"Participant"
class=
"performa.form.CompleteApplicationFP"
/>
<FORM
name=
"*.completeApplication"
factory=
"Participant"
class=
"performa.form.CompleteApplicationFP"
/>
<FORM
name=
"*.saveAndExitExperienece"
factory=
"Participant"
class=
"performa.form.SaveAndExitExperienceFP"
/>
<FORM
name=
"*.saveAndExitExperienece"
factory=
"Participant"
class=
"performa.form.SaveAndExitExperienceFP"
/>
<FORM
name=
"*.saveAndExitCulture"
factory=
"Participant"
class=
"performa.form.SaveAndExitCultureFP"
/>
<FORM
name=
"*.saveAndExitCulture"
factory=
"Participant"
class=
"performa.form.SaveAndExitCultureFP"
/>
<FORM
name=
"*.saveAndExitWorkStyle"
factory=
"Participant"
class=
"performa.form.SaveAndExitWorkStypeFP"
/>
</NODE>
</NODE>
...
...
cmsWebApp/webroot/extensions/applicantportal/job_match_assessment.jsp
View file @
8610af15
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
String nextPage = WebUtils.getSamePageInRenderMode(request, "SubmitApplication");
String nextPage = WebUtils.getSamePageInRenderMode(request, "SubmitApplication");
JobApplication jobApplication = (JobApplication) process.getAttribute("JobApplication");
JobApplication jobApplication = (JobApplication) process.getAttribute("JobApplication");
Job job = jobApplication.getJob();
Job job = jobApplication.getJob();
int questionNumber = process.getAttribute("QuestionNumber")!= null ? (int) process.getAttribute("QuestionNumber") : 0;
int questionNumber = process.getAttribute("QuestionNumber")!= null ? (int) process.getAttribute("QuestionNumber") : jobApplication.getProfileAssessmentAnswersCount();
String sectionNo = jobApplication.isIncludeAssessmentCriteria() ? "3" : "2";
List<Question> allQuestions = (List<Question>) process.getAttribute("AllQuestions");
List<Question> allQuestions = (List<Question>) process.getAttribute("AllQuestions");
String exitPage = WebUtils.getArticleLink(request, transaction, WebUtils.APPLY_JOB, "Page") + "&id=" + job.getID() + "&key=" + job.getRandomKey();
if(allQuestions == null)
if(allQuestions == null)
{
{
allQuestions = job.getAllLeftQuestions();
allQuestions = job.getAllLeftQuestions();
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
if(toRedirect)
if(toRedirect)
{
{
process.setAttribute("QuestionNumber", questionNumber);
%><%@include file="/saferedirect.jsp" %><%
%><%@include file="/saferedirect.jsp" %><%
}
}
%>
%>
...
@@ -38,6 +40,11 @@
...
@@ -38,6 +40,11 @@
$(".ratting-number input[type='radio']:checked").closest('li').addClass("active" );
$(".ratting-number input[type='radio']:checked").closest('li').addClass("active" );
});
});
});
});
function gotoNextQuestion()
{
$("#nextButton").click();
}
</script>
</script>
<div class="main-application-outline">
<div class="main-application-outline">
...
@@ -138,7 +145,7 @@
...
@@ -138,7 +145,7 @@
%>
%>
<li class="<%= activeStr %>">
<li class="<%= activeStr %>">
<a href="javascript:void(0);">
<a href="javascript:void(0);">
<input type="radio" name="<%= optionKey %>" id="<%= index %>" class="answer_radio" value="<%= index %>" <%= selectedStr %>>
<input type="radio" name="<%= optionKey %>" id="<%= index %>"
onchange="gotoNextQuestion();"
class="answer_radio" value="<%= index %>" <%= selectedStr %>>
<label for="<%= index %>"><%= index %></label>
<label for="<%= index %>"><%= index %></label>
</a>
</a>
</li>
</li>
...
@@ -165,47 +172,38 @@
...
@@ -165,47 +172,38 @@
}
}
%>
%>
<div>
<div>
<span style="float: left">
<%
<%
if(
questionNumber>0
)
if(
(questionNumber+1) < totNoOfQuestions
)
{
{
%>
%>
<oneit:button value="
Previous" name="gotoPage" cssClass="box-btn-gray"
<oneit:button value="
" name="gotoPage" id="nextButton" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry("procParams", CollectionUtils.mapEntry("QuestionNumber", (questionNumber
-
1)).toMap())
.mapEntry("procParams", CollectionUtils.mapEntry("QuestionNumber", (questionNumber
+
1)).toMap())
.toMap() %>"/>
.toMap() %>"/>
<%
<%
}
}
%>
else
</span>
<span style="float: right">
<%
if((questionNumber+1)<totNoOfQuestions)
{
{
%>
%>
<oneit:button value="Next" name="gotoPage" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
<oneit:button value="Complete" name="completeApplication" id="nextButton" skin="link"
.mapEntry("procParams", CollectionUtils.mapEntry("QuestionNumber", (questionNumber + 1)).toMap())
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.toMap() %>"/>
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.mapEntry("restartProcess", Boolean.TRUE)
.toMap() %>"/>
<%
<%
}
}
%>
%>
</span>
</div>
</div>
<div class="auto-save">
<div class="auto-save">
<%
<span style="float: left">
if((questionNumber+1) == totNoOfQuestions)
<oneit:button value="Save and exit" name="saveAndExitWorkStyle" cssClass="box-btn-gray"
{
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", exitPage)
%>
.mapEntry ("JobApplication", jobApplication)
<oneit:button value="Complete" name="completeApplication" cssClass="box-btn"
.mapEntry(UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.toMap() %>"/>
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
</span>
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.mapEntry("restartProcess", Boolean.TRUE)
.toMap() %>"/>
<%
}
%>
<%-- <div>Autosaved 1 min ago.</div> --%>
<%-- <div>Autosaved 1 min ago.</div> --%>
</div>
</div>
</div>
</div>
...
...
cmsWebApp/webroot/extensions/applicantportal/submit_application.jsp
View file @
8610af15
...
@@ -30,12 +30,14 @@
...
@@ -30,12 +30,14 @@
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
has been submitted for review.
has been submitted for review.
</div>
</div>
<div class="section-btn text-center">
<oneit:form name="applyJob" method="post" enctype="multipart/form-data">
<oneit:button value="Return to Job Details" name="gotoPage" cssClass="box-btn"
<div class="section-btn text-center">
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", exitPage)
<oneit:button value="Return to Job Details" name="gotoPage" cssClass="box-btn"
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", exitPage)
.toMap() %>"/>
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
</div>
.toMap() %>"/>
</div>
</oneit:form>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment