Commit d372c95c by Nilu

J001 work flow, ajax add and delete

parent 74e2d0d8
......@@ -13,30 +13,38 @@
ApplicationStatus status = Utils.getApplicationStatus(sortOrder);
WorkFlow workflow = null;
if(job.getWorkFlowsCount() < 10 && status != null)
if(job.getWorkFlowsCount() < 9 && status != null)
{
workflow = WorkFlow.createWorkFlow(objTran);
// workFlow.setName(status.getDescription());
workflow.setApplicationStatus(status);
workflow.setSortOrder(sortOrder);
job.addToWorkFlows(workflow);
}
%>
<oneit:form method="POST">
<oneit:evalBody buffer="<%= getBuffer(request) %>">
<div class="form-group row">
<div class="col-md-12">
<div class="workflow-row">
<span><%= workflow.getSortOrder() %></span>
<oneit:ormInput obj="<%= workflow %>" type="text" attributeName="Name" cssClass="form-control" />
<div class="remove-icon">_</div>
<oneit:form method="POST">
<oneit:evalBody buffer="<%= getBuffer(request) %>">
<%
FormTag myForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = myForm.getFormBuilder();
String deleteVarKey = FormTag.getVariableKey (request);
FormTag.setVariable (request, deleteVarKey, "objToDelete", workflow);
FormTag.setVariable (request, deleteVarKey, "jqToDelete", "#" + workflow.getID());
%>
<div class="form-group row" id="<%= workflow.getID() %>">
<div class="col-md-12">
<div class="workflow-row">
<span><%= workflow.getSortOrder() %></span>
<oneit:ormInput obj="<%= workflow %>" type="text" attributeName="Name" cssClass="form-control" />
<div class="remove-icon" onclick="return deleteWorkflow (<%= deleteVarKey %>)">_</div>
</div>
</div>
</div>
</div>
</oneit:evalBody>
</oneit:form>
\ No newline at end of file
</oneit:evalBody>
</oneit:form>
<%
}
%>
\ No newline at end of file
......@@ -81,11 +81,10 @@
});
}
function deleteWorkflow()
function deleteWorkflow(deleteVarKey)
{
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/workflow_add.jsp", "#middle-workflows", {}, function (theHTML_JQ) {
$("#middle-workflows").append (theHTML_JQ);
});
ajaxProcessDeleteJQ("<%= request.getContextPath() %>/genericDelete_AJAX.jsp", "#middle-workflows" , { varKey: deleteVarKey });
return false;
}
</script>
......@@ -372,7 +371,7 @@
</div>
</div>
<div class="form-group row" style="text-align: center;">
<div class="form-group row" style="text-align: center;" >
<oneit:button value="Add Workflow Step" name="gotoPage" cssClass="add-more-btn review-edit-btn" skin="link"
onClick="<%="addWorkflow(); return false;"%>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", jobPage).toMap() %>"/>
......@@ -468,7 +467,7 @@
</div>
<div class="occupation_select_info">
Select the most appropirate Category to help narrow down your Occupation
Select the most appropriate Category to help narrow down your Occupation
</div>
<div class="occupation_select_button">
<button type="button" value="Save Job Occupation" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button>
......
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