Commit 571584f0 by Nilu

Remove selection of Filter (Role Type)

parent 8c6e70e7
......@@ -11,6 +11,8 @@
<column name="code" type="String" nullable="false" length="4"/>
<column name="name" type="String" nullable="false" length="250"/>
<column name="level" type="String" nullable="false" length="200"/>
<column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="assessment_level_id" type="Long" length="11" nullable="true"/>
<column name="parent_occupation_id" type="Long" length="11" nullable="true"/>
</NODE>
......
......@@ -11,6 +11,8 @@ CREATE TABLE tl_occupation (
code varchar(4) NOT NULL,
name varchar(250) NOT NULL,
level varchar(200) NOT NULL,
assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL
);
......
......@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation (
code varchar2(4) NOT NULL,
name varchar2(250) NOT NULL,
level varchar2(200) NOT NULL,
assessment_type varchar2(200) NULL,
assessment_level_id number(12) NULL,
parent_occupation_id number(12) NULL
);
......
......@@ -12,6 +12,8 @@ CREATE TABLE tl_occupation (
code varchar(4) NOT NULL,
name varchar(250) NOT NULL,
level varchar(200) NOT NULL,
assessment_type varchar(200) NULL,
assessment_level_id numeric(12) NULL,
parent_occupation_id numeric(12) NULL
);
......
......@@ -24,7 +24,11 @@ public class ProcessCultureFP extends SaveFP
if(job.getOccupationId() != null)
{
job.setOccupation(Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId())));
Occupation occupation = Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()));
job.setOccupation(occupation);
job.setLevel(occupation.getAssessmentLevel());
job.setAssessmentType(occupation.getAssessmentType());
}
return new ProcessRedirectResult((String) submission.getRequest().getAttribute("nextPage"), new String[0]);
......@@ -52,12 +56,12 @@ public class ProcessCultureFP extends SaveFP
BusinessObjectParser.assertFieldCondition(job.getOccupation() != null, job , Job.SINGLEREFERENCE_Occupation, "mandatory", exceptions, true, request);
}
BusinessObjectParser.assertFieldCondition(job.getLevel()!= null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
if(job.getLevel() != null)
{
BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
}
// BusinessObjectParser.assertFieldCondition(job.getLevel()!= null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
//
// if(job.getLevel() != null)
// {
// BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
// }
}
if(fromCulture)
......
......@@ -83,7 +83,11 @@ public class SaveJobFP extends SaveFP
if(job.getOccupationId() != null)
{
job.setOccupation(Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId())));
Occupation occupation = Occupation.getOccupationByID(process.getTransaction(), Long.valueOf(job.getOccupationId()));
job.setOccupation(occupation);
job.setLevel(occupation.getAssessmentLevel());
job.setAssessmentType(occupation.getAssessmentType());
}
// restarting process as custom attributes needs to be updated to intercom
......@@ -106,20 +110,19 @@ public class SaveJobFP extends SaveFP
{
HttpServletRequest request = submission.getRequest();
Job job = process.getAttribute("Job") != null ? (Job) process.getAttribute("Job") : (Job) request.getAttribute("Job");
Boolean openJob = (Boolean) request.getAttribute("openJob");
JobStatus status = (JobStatus) request.getAttribute("JobStatus");
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
if(job.getJobStatus() != JobStatus.DRAFT || openJob == Boolean.TRUE)
{
BusinessObjectParser.assertFieldCondition(job.getLevel() != null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
if(job.getLevel() != null)
{
BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
}
}
// if(job.getJobStatus() != JobStatus.DRAFT || openJob == Boolean.TRUE)
// {
// BusinessObjectParser.assertFieldCondition(job.getLevel() != null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
//
// if(job.getLevel() != null)
// {
// BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
// }
// }
if(status != null && status == JobStatus.OPEN)
{
......
......@@ -12,7 +12,9 @@
<ATTRIB name="Code" type="String" dbcol="code" length="4" mandatory="true" isUnique="true"/>
<ATTRIB name="Name" type="String" dbcol="name" length="250" mandatory="true"/>
<ATTRIB name="Level" type="OccupationLevel" dbcol="level" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="AssessmentType" type="AssessmentType" dbcol="assessment_type" attribHelper="EnumeratedAttributeHelper" />
<SINGLEREFERENCE name="AssessmentLevel" type="Level" dbcol="assessment_level_id" />
<SINGLEREFERENCE name="ParentOccupation" type="Occupation" dbcol="parent_occupation_id" backreferenceName="ChildOccupations"/>
</TABLE>
......
......@@ -30,12 +30,14 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
private String dummyCode;
private String dummyName;
private OccupationLevel dummyLevel;
private AssessmentType dummyAssessmentType;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_Level = new EnumeratedAttributeHelper (OccupationLevel.FACTORY_OccupationLevel);
private static final EnumeratedAttributeHelper HELPER_AssessmentType = new EnumeratedAttributeHelper (AssessmentType.FACTORY_AssessmentType);
......@@ -45,10 +47,11 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
dummyCode = (String)(HELPER_Code.initialise (dummyCode));
dummyName = (String)(HELPER_Name.initialise (dummyName));
dummyLevel = (OccupationLevel)(HELPER_Level.initialise (dummyLevel));
dummyAssessmentType = (AssessmentType)(HELPER_AssessmentType.initialise (dummyAssessmentType));
}
private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.assessment_type, {PREFIX}tl_occupation.assessment_level_id, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -102,6 +105,8 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Code)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Name)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Level)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_AssessmentType)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ParentOccupation))
{
// We will need to retrieve it
......@@ -182,10 +187,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_occupation " +
"SET code = ?, name = ?, level = ?, parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET code = ?, name = ?, level = ?, assessment_type = ?, assessment_level_id = ? , parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_occupation.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -444,7 +449,9 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
tl_occupationPSet.setAttrib(Occupation.FIELD_Code, HELPER_Code.getFromRS(dummyCode, r, "code"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Name, HELPER_Name.getFromRS(dummyName, r, "name"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Level, HELPER_Level.getFromRS(dummyLevel, r, "level"));
tl_occupationPSet.setAttrib(Occupation.FIELD_AssessmentType, HELPER_AssessmentType.getFromRS(dummyAssessmentType, r, "assessment_type"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_AssessmentLevel, r.getObject ("assessment_level_id"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ParentOccupation, r.getObject ("parent_occupation_id"));
}
......@@ -462,10 +469,10 @@ public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_occupation " +
" (code, name, level, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (code, name, level, assessment_type, assessment_level_id, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (HELPER_AssessmentType.getForSQL(dummyAssessmentType, tl_occupationPSet.getAttrib (Occupation.FIELD_AssessmentType))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_AssessmentLevel)))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray());
tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -14,8 +14,14 @@
Debug.assertion(template != null && !toRedirect, "Invalid template in job templates");
%>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<script type="text/javascript">
var lastclickedOccid = 0 , lastclickedOcc = "" ;
var lastclickedOccid = 0 , lastclickedOcc = "" , levelClicked = "";
var occPopup;
var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null };
var scrolldiv = null ;
......@@ -152,9 +158,17 @@
lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ');
levelClicked = thisEle.data('level');
if(levelClicked === "fourth"){
$('.btn-save-occ').removeAttr('disabled');
$(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid);
} else {
$(".select-occupation").val("");
$("#select-occupation-id").val(0);
$('.btn-save-occ').attr('disabled', 'disabled');
}
thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked");
......@@ -369,64 +383,6 @@
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Select your assessment type</label>
</div>
</div>
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String assessmentTypeKey = WebUtils.getInputKey(request, template, AssessmentCriteriaTemplate.FIELD_AssessmentType);
String assessmentTypeValue = formBuilder.fieldValue (assessmentTypeKey, template.getAssessmentType() == null ? "" : template.getAssessmentType().getName());
for(AssessmentType assessmentType : AssessmentType.getAssessmentTypeArray())
{
String assessmentTypeId = assessmentType.getName();
String selectedStr = CollectionUtils.equals(assessmentTypeValue, assessmentTypeId) ? "checked" : "";
String levelKey = WebUtils.getRadioSingleAssocKey(request, template, AssessmentCriteriaTemplate.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, template.getLevel() == null ? "" : String.valueOf(template.getLevelID()));
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" class="type_radio" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<span class="label-title"><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></span>
<oneit:toString value="<%= assessmentType.getQuestionDetails() %>" mode="EscapeHTML"/><br />
</label>
</div>
<oneit:recalcClass htmlTag="div" classScript="template.getAssessmentType() == assessmentType ? 'main-pack-type' : '' " template="<%= template %>" assessmentType="<%= assessmentType %>">
<ul>
<%
for(Level level : Level.getAllLevelsforAssessmentType(transaction, assessmentType))
{
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
%>
<oneit:recalcClass htmlTag="li" classScript="template.getLevelClass(level)" template="<%= template %>" level="<%= level %>">
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= level %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= level.getCSSClass() %>"></span>
</label>
</a>
</oneit:recalcClass>
<%
}
%>
</ul>
</oneit:recalcClass>
<div class="clearfix"></div>
<%
}
String levelKey = WebUtils.getRadioSingleAssocKey(request, template, AssessmentCriteriaTemplate.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, template.getLevel() == null ? "" : String.valueOf(template.getLevelID()));
%>
</div>
<div class="form-page-section darkbg">
<div class="form-group row">
......@@ -521,28 +477,28 @@
for (Occupation firstLevel : firstLevelOccupations)
{
%>
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>">
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>" data-level="first">
<span> <%= firstLevel%> </span>
<ul class="level1">
<%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>">
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>" data-level="second">
<span> <%= secondLevel%></span>
<ul class="level2">
<%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>">
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>" data-level="third">
<span> <%= thirdLevel%></span>
<ul class="level3">
<%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>">
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>" data-level="fourth">
<span> <%= fourthLevel%></span>
</li>
<%
......@@ -575,7 +531,7 @@
Select the most appropriate Category to help narrow down your Occupation
</div>
<div class="occupation_select_button">
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button>
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn btn-save-occ" style="" disabled>Save Job Occupation</button>
</div>
</div>
......
......@@ -17,8 +17,14 @@
String nextPage = WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
%>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<script type="text/javascript">
var lastclickedOccid = 0 , lastclickedOcc = "" ;
var lastclickedOccid = 0 , lastclickedOcc = "" , levelClicked = "";
var occPopup;
var occlistObj = {"level0" : null , "level1" : null , "level2" : null , "level3" : null };
var scrolldiv = null ;
......@@ -155,9 +161,17 @@
lastclickedOccid = thisEle.data('id');
lastclickedOcc = thisEle.data('occ');
levelClicked = thisEle.data('level');
if(levelClicked === "fourth"){
$('.btn-save-occ').removeAttr('disabled');
$(".select-occupation").val(lastclickedOcc);
$("#select-occupation-id").val(lastclickedOccid);
} else {
$(".select-occupation").val("");
$("#select-occupation-id").val(0);
$('.btn-save-occ').attr('disabled', 'disabled');
}
thisEle.siblings('li').removeClass("clicked");
thisEle.addClass("clicked");
......@@ -385,65 +399,6 @@
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<label class="label-16">Select your assessment type</label>
</div>
</div>
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String assessmentTypeKey = WebUtils.getInputKey(request, job, Job.FIELD_AssessmentType);
String assessmentTypeValue = formBuilder.fieldValue (assessmentTypeKey, job.getAssessmentType() == null ? "" : job.getAssessmentType().getName());
for(AssessmentType assessmentType : AssessmentType.getAssessmentTypeArray())
{
String assessmentTypeId = assessmentType.getName();
String selectedStr = CollectionUtils.equals(assessmentTypeValue, assessmentTypeId) ? "checked" : "";
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" class="type_radio" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<span class="label-title"><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></span>
<oneit:toString value="<%= assessmentType.getQuestionDetails() %>" mode="EscapeHTML"/><br />
</label>
</div>
<oneit:recalcClass htmlTag="div" classScript="job.getAssessmentType() == assessmentType ? 'main-pack-type' : '' " job="<%= job %>" assessmentType="<%= assessmentType %>">
<ul>
<%
for(Level level : Level.getAllLevelsforAssessmentType(transaction, assessmentType))
{
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
%>
<oneit:recalcClass htmlTag="li" classScript="job.getLevelClass(level)" job="<%= job %>" level="<%= level %>">
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= level %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= level.getCSSClass() %>"></span>
</label>
</a>
</oneit:recalcClass>
<%
}
%>
</ul>
</oneit:recalcClass>
<div class="clearfix"></div>
<%
}
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
</div>
<div class="form-page-section darkbg">
<div class="form-group row">
......@@ -567,28 +522,28 @@
for (Occupation firstLevel : firstLevelOccupations)
{
%>
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>">
<li class="main-item" data-id="<%= firstLevel.getObjectID()%>" data-occ="<%= firstLevel%>" data-level="first">
<span> <%= firstLevel%> </span>
<ul class="level1">
<%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>">
<li data-id="<%= secondLevel.getObjectID()%>" data-occ="<%= secondLevel%>" data-level="second">
<span> <%= secondLevel%></span>
<ul class="level2">
<%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>">
<li data-id="<%= thirdLevel.getObjectID()%>" data-occ="<%= thirdLevel%>" data-level="third">
<span> <%= thirdLevel%></span>
<ul class="level3">
<%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{
%>
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>">
<li data-id="<%= fourthLevel.getObjectID()%>" data-occ="<%= fourthLevel%>" data-level="fourth">
<span> <%= fourthLevel%></span>
</li>
<%
......@@ -621,7 +576,7 @@
Select the most appropriate Category to help narrow down your Occupation
</div>
<div class="occupation_select_button">
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button>
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn btn-save-occ" style="" disabled>Save Job Occupation</button>
</div>
</div>
<script>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_occupation</tableName>
<column name="assessment_type" type="String" nullable="true" length="200"/>
<column name="assessment_level_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
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