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 @@
List<Question> totalQuestions = (List<Question>) process.getAttribute("TotalQuestions");
List<Question> allQuestions = (List<Question>) process.getAttribute("AllQuestions");
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)
{
......@@ -39,6 +40,9 @@
%><%@include file="/saferedirect.jsp" %><%
}
Question question = allQuestions.get(questionNumber);
QuestionType questionType = question.getQuestionType();
%>
<script>
$(document.body).addClass('bg-color');
......@@ -83,6 +87,14 @@
<oneit:dynInclude page="/extensions/applicantportal/inc/application_main_tabs.jsp" PageNumber="3" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="section-page-area section-job-match">
<%
if(actualNumber == 1 || (showHelp && questionType != QuestionType.SCALAR))
{
if(questionType != QuestionType.SCALAR)
{
process.setAttribute("ShowHelp", false);
}
%>
<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>
<ul class="security-level">
......@@ -93,6 +105,9 @@
<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">
<%
FormTag applicationForm = FormTag.getActiveFormTag(request);
......@@ -101,8 +116,6 @@
if(actualNumber <= totNoOfQuestions)
{
Question question = allQuestions.get(questionNumber);
QuestionType questionType = question.getQuestionType();
Answer answer = jobApplication.getAnswerForQuestion(question);
String optionKey = WebUtils.getInputKey(request, answer, Answer.FIELD_AnswerNo);
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