Commit d372c95c by Nilu

J001 work flow, ajax add and delete

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