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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
38 deletions
+93
-38
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
+26
-11
CustomServlets_applicantPortal.xml
...nsions/applicantportal/CustomServlets_applicantPortal.xml
+1
-0
job_match_assessment.jsp
...broot/extensions/applicantportal/job_match_assessment.jsp
+24
-26
submit_application.jsp
...webroot/extensions/applicantportal/submit_application.jsp
+2
-0
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
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"
);
...
...
cmsWebApp/src/performa/orm/JobApplication.java
View file @
8610af15
...
...
@@ -116,29 +116,44 @@ 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
;
List
<
Question
>
allQuestions
=
new
ArrayList
<>();
if
(
getProfileAssessmentAnswersCount
()
==
0
)
for
(
Question
question
:
questions
)
{
allQuestions
.
add
(
question
);
if
(
question
.
getRightQuestion
()
!=
null
)
{
allQuestions
.
add
(
question
.
getRightQuestion
());
}
}
for
(
Question
question
:
allQuestions
)
{
redirect
=
true
;
Answer
answer
=
Answer
.
createAnswer
(
getTransaction
());
boolean
available
=
false
;
addToProfileAssessmentAnswers
(
answer
);
answer
.
setQuestion
(
question
);
for
(
Answer
answer
:
getProfileAssessmentAnswersSet
())
{
if
(
question
.
equals
(
answer
.
getQuestion
()))
{
available
=
true
;
break
;
}
}
if
(
question
.
getRightQuestion
()
!=
null
)
if
(!
available
)
{
Answer
rightAnswer
=
Answer
.
createAnswer
(
getTransaction
());
Answer
answer
=
Answer
.
createAnswer
(
getTransaction
());
addToProfileAssessmentAnswers
(
rightA
nswer
);
rightAnswer
.
setQuestion
(
question
.
getRightQuestion
());
}
addToProfileAssessmentAnswers
(
a
nswer
);
answer
.
setQuestion
(
question
);
redirect
=
true
;
}
}
return
redirect
;
}
...
...
cmsWebApp/webroot/extensions/applicantportal/CustomServlets_applicantPortal.xml
View file @
8610af15
...
...
@@ -7,6 +7,7 @@
<FORM
name=
"*.completeApplication"
factory=
"Participant"
class=
"performa.form.CompleteApplicationFP"
/>
<FORM
name=
"*.saveAndExitExperienece"
factory=
"Participant"
class=
"performa.form.SaveAndExitExperienceFP"
/>
<FORM
name=
"*.saveAndExitCulture"
factory=
"Participant"
class=
"performa.form.SaveAndExitCultureFP"
/>
<FORM
name=
"*.saveAndExitWorkStyle"
factory=
"Participant"
class=
"performa.form.SaveAndExitWorkStypeFP"
/>
</NODE>
...
...
cmsWebApp/webroot/extensions/applicantportal/job_match_assessment.jsp
View file @
8610af15
...
...
@@ -10,9 +10,9 @@
String nextPage = WebUtils.getSamePageInRenderMode(request, "SubmitApplication");
JobApplication jobApplication = (JobApplication) process.getAttribute("JobApplication");
Job job = jobApplication.getJob();
int questionNumber = process.getAttribute("QuestionNumber")!= null ? (int) process.getAttribute("QuestionNumber") : 0;
String sectionNo = jobApplication.isIncludeAssessmentCriteria() ? "3" : "2";
int questionNumber = process.getAttribute("QuestionNumber")!= null ? (int) process.getAttribute("QuestionNumber") : jobApplication.getProfileAssessmentAnswersCount();
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)
{
...
...
@@ -25,6 +25,8 @@
if(toRedirect)
{
process.setAttribute("QuestionNumber", questionNumber);
%><%@include file="/saferedirect.jsp" %><%
}
%>
...
...
@@ -38,6 +40,11 @@
$(".ratting-number input[type='radio']:checked").closest('li').addClass("active" );
});
});
function gotoNextQuestion()
{
$("#nextButton").click();
}
</script>
<div class="main-application-outline">
...
...
@@ -138,7 +145,7 @@
%>
<li class="<%= activeStr %>">
<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>
</a>
</li>
...
...
@@ -165,39 +172,21 @@
}
%>
<div>
<span style="float: left">
<%
if(questionNumber>0)
{
%>
<oneit:button value="Previous" name="gotoPage" cssClass="box-btn-gray"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry("procParams", CollectionUtils.mapEntry("QuestionNumber", (questionNumber - 1)).toMap())
.toMap() %>"/>
<%
}
%>
</span>
<span style="float: right">
<%
if((questionNumber+1)
<
totNoOfQuestions)
if((questionNumber+1)
<
totNoOfQuestions)
{
%>
<oneit:button value="
Next" name="gotoPage" cssClass="box-btn"
<oneit:button value="
" name="gotoPage" id="nextButton" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry("procParams", CollectionUtils.mapEntry("QuestionNumber", (questionNumber + 1)).toMap())
.toMap() %>"/>
<%
}
%>
</span>
</div>
<div class="auto-save">
<%
if((questionNumber+1) == totNoOfQuestions)
else
{
%>
<oneit:button value="Complete" name="completeApplication" cssClass="box-btn"
<oneit:button value="Complete" name="completeApplication" id="nextButton" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
...
...
@@ -206,6 +195,15 @@
<%
}
%>
</div>
<div class="auto-save">
<span style="float: left">
<oneit:button value="Save and exit" name="saveAndExitWorkStyle" cssClass="box-btn-gray"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", exitPage)
.mapEntry ("JobApplication", jobApplication)
.mapEntry(UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>"/>
</span>
<%-- <div>Autosaved 1 min ago.</div> --%>
</div>
</div>
...
...
cmsWebApp/webroot/extensions/applicantportal/submit_application.jsp
View file @
8610af15
...
...
@@ -30,12 +30,14 @@
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
has been submitted for review.
</div>
<oneit:form name="applyJob" method="post" enctype="multipart/form-data">
<div class="section-btn text-center">
<oneit:button value="Return to Job Details" name="gotoPage" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", exitPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>"/>
</div>
</oneit:form>
</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