Commit 82d310da by Nilu Committed by Harsh Shah

Help text - Only show help content for the first question sections of each type; hide it otherwise

parent 9d82d3e2
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
List<Question> totalQuestions = (List<Question>) process.getAttribute("TotalQuestions"); List<Question> totalQuestions = (List<Question>) process.getAttribute("TotalQuestions");
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(); String exitPage = WebUtils.getArticleLink(request, transaction, WebUtils.APPLY_JOB, "Page") + "&id=" + job.getID() + "&key=" + job.getRandomKey();
boolean showHelp = process.getAttribute("ShowHelp")!= null ? (boolean)process.getAttribute("ShowHelp") : true;
if(totalQuestions == null) if(totalQuestions == null)
{ {
...@@ -39,6 +40,9 @@ ...@@ -39,6 +40,9 @@
%><%@include file="/saferedirect.jsp" %><% %><%@include file="/saferedirect.jsp" %><%
} }
Question question = allQuestions.get(questionNumber);
QuestionType questionType = question.getQuestionType();
%> %>
<script> <script>
$(document.body).addClass('bg-color'); $(document.body).addClass('bg-color');
...@@ -83,16 +87,27 @@ ...@@ -83,16 +87,27 @@
<oneit:dynInclude page="/extensions/applicantportal/inc/application_main_tabs.jsp" PageNumber="3" data="<%= CollectionUtils.EMPTY_MAP%>"/> <oneit:dynInclude page="/extensions/applicantportal/inc/application_main_tabs.jsp" PageNumber="3" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="section-page-area section-job-match"> <div class="section-page-area section-job-match">
<div class="main-sc-section sj-1"> <%
<p>Using the scale given, indicate how important to you are the following aspects in your work life. Use the following system:</p> if(actualNumber == 1 || (showHelp && questionType != QuestionType.SCALAR))
<ul class="security-level"> {
<li><span>1</span> means of very little importance to you</li> if(questionType != QuestionType.SCALAR)
<li><span>4</span> means about average in importance to you</li> {
<li><span>7</span> means of high importance to you</li> process.setAttribute("ShowHelp", false);
</ul> }
<p>Use the other numbers (2, 3, 5, 6) to indicate in-between levels of importance to you.</p> %>
</div> <div class="main-sc-section sj-1">
<div class="selection-br-line"></div> <p>Using the scale given, indicate how important to you are the following aspects in your work life. Use the following system:</p>
<ul class="security-level">
<li><span>1</span> means of very little importance to you</li>
<li><span>4</span> means about average in importance to you</li>
<li><span>7</span> means of high importance to you</li>
</ul>
<p>Use the other numbers (2, 3, 5, 6) to indicate in-between levels of importance to you.</p>
</div>
<div class="selection-br-line"></div>
<%
}
%>
<div class="main-sc-section main-rate-section"> <div class="main-sc-section main-rate-section">
<% <%
FormTag applicationForm = FormTag.getActiveFormTag(request); FormTag applicationForm = FormTag.getActiveFormTag(request);
...@@ -101,8 +116,6 @@ ...@@ -101,8 +116,6 @@
if(actualNumber <= totNoOfQuestions) if(actualNumber <= totNoOfQuestions)
{ {
Question question = allQuestions.get(questionNumber);
QuestionType questionType = question.getQuestionType();
Answer answer = jobApplication.getAnswerForQuestion(question); Answer answer = jobApplication.getAnswerForQuestion(question);
String optionKey = WebUtils.getInputKey(request, answer, Answer.FIELD_AnswerNo); String optionKey = WebUtils.getInputKey(request, answer, Answer.FIELD_AnswerNo);
String formValue = formBuilder.fieldValue (optionKey, answer.getAnswerNo() == null ? "" : String.valueOf(answer.getAnswerNo())); String formValue = formBuilder.fieldValue (optionKey, answer.getAnswerNo() == null ? "" : String.valueOf(answer.getAnswerNo()));
......
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