Commit 1821a882 by Nilu

Should not allow proceeding without selecting the Role Type

parent 42cdf297
......@@ -28,8 +28,9 @@ public class ProcessCultureFP extends SaveFP
{
super.validate(process, submission, exceptions, params);
HttpServletRequest request = submission.getRequest();
Job job = (Job) process.getAttribute("Job");
HttpServletRequest request = submission.getRequest();
Job job = (Job) process.getAttribute("Job");
boolean fromJobMatch = request.getAttribute("fromJobMatch") != null ? (boolean) request.getAttribute("fromJobMatch"): false;
Debug.assertion(job != null, "No job found . Call from " + getClass().getName());
......@@ -40,5 +41,10 @@ public class ProcessCultureFP extends SaveFP
BusinessObjectParser.assertFieldCondition(criteria.getCultureElementRating() != null, criteria , CultureCriteria.SINGLEREFERENCE_CultureElementRating, "mandatory", exceptions, true, request);
}
}
if(fromJobMatch)
{
BusinessObjectParser.assertFieldCondition(job.getLevel()!= null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
}
}
}
\ No newline at end of file
......@@ -5,14 +5,15 @@
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%
Job job = (Job) process.getAttribute("Job");
String pageNumber = (String) getData(request, "PageNumber");
String firstPage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATE_JOB);
String secondPage = WebUtils.getSamePageInRenderMode(request, WebUtils.JOB_MATCH);
String thirdPage = WebUtils.getSamePageInRenderMode(request, WebUtils.WORKPLACE_CULTURE);
String fourthPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
String fifthPage = WebUtils.getSamePageInRenderMode(request, WebUtils.JOB_REVIEW);
boolean savedJob = job.getStatus() != ObjectStatus.NEW;
Job job = (Job) process.getAttribute("Job");
String pageNumber = (String) getData(request, "PageNumber");
String firstPage = WebUtils.getSamePageInRenderMode(request, WebUtils.CREATE_JOB);
String secondPage = WebUtils.getSamePageInRenderMode(request, WebUtils.JOB_MATCH);
String thirdPage = WebUtils.getSamePageInRenderMode(request, WebUtils.WORKPLACE_CULTURE);
String fourthPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
String fifthPage = WebUtils.getSamePageInRenderMode(request, WebUtils.JOB_REVIEW);
boolean savedJob = job.getStatus() != ObjectStatus.NEW;
boolean fromJobMatch = pageNumber == "2";
%>
<oneit:dynIncluded>
......@@ -20,9 +21,10 @@
<div class="main-tab-form job-main-tabs">
<ul class="nav nav-pills nav-justified">
<li class="<%= pageNumber == "1" ? "active" : CollectionUtils.equals(job.getCompletedDetails(), Boolean.TRUE) || savedJob ? "complate" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link"
<oneit:button value=" " name="processCulture" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", firstPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.mapEntry("fromJobMatch", fromJobMatch)
.toMap() %>">
<span><%= CollectionUtils.equals(job.getCompletedDetails(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "1"%></span>
Job Detail
......@@ -32,6 +34,7 @@
<oneit:button value=" " name="processCulture" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", secondPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.mapEntry("fromJobMatch", fromJobMatch)
.toMap() %>">
<span><%= CollectionUtils.equals(job.getCompletedAssessmentType(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "2"%></span>
Role
......@@ -41,6 +44,7 @@
<oneit:button value=" " name="processCulture" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", thirdPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.mapEntry("fromJobMatch", fromJobMatch)
.toMap() %>">
<span><%= CollectionUtils.equals(job.getCompletedCulture(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "3"%></span>
Culture
......@@ -50,6 +54,7 @@
<oneit:button value=" " name="processCulture" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", fourthPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.mapEntry("fromJobMatch", fromJobMatch)
.toMap() %>">
<span><%= CollectionUtils.equals(job.getCompletedRequirements(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "4"%></span>
Requirements
......@@ -59,6 +64,7 @@
<oneit:button value=" " name="processCulture" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", fifthPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.mapEntry("fromJobMatch", fromJobMatch)
.toMap() %>">
<span>5</span>
Review
......
......@@ -113,9 +113,10 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", jobPage)
.mapEntry(UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>"/>
<oneit:button value="Proceed to Culture" name="gotoPage" cssClass="btn btn-primary top-margin-37 largeBtn"
<oneit:button value="Proceed to Culture" name="processCulture" cssClass="btn btn-primary top-margin-37 largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.mapEntry("fromJobMatch", true)
.toMap() %>"/>
</div>
</div>
......
......@@ -118,19 +118,18 @@
</div>
<div class="form-group row">
<div class="col-md-4">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= job %>" id="is-remote" attributeName="Remote" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="job.getRemote() != null && job.getRemote() ? 'checked': 'unchecked'" job="<%= job %>">
<label for="is-remote">
<oneit:label GUIName="Working remotely is an option" />
</label>
</oneit:recalcClass>
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= job %>" id="is-remote" attributeName="Remote" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="job.getRemote() != null && job.getRemote() ? 'checked': 'unchecked'" job="<%= job %>">
<label for="is-remote">
<oneit:label GUIName="Working remotely is an option" />
</label>
</oneit:recalcClass>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-brack-line-sub"></div>
<%
......
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