Commit 1821a882 by Nilu

Should not allow proceeding without selecting the Role Type

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