Commit e944c0de by Nilu

code refactoring

parent a00dd374
...@@ -49,36 +49,6 @@ ...@@ -49,36 +49,6 @@
$(".oneit-radio label").removeClass('checked'); $(".oneit-radio label").removeClass('checked');
$(ele).closest('label').addClass('checked'); $(ele).closest('label').addClass('checked');
} }
function saveOwnBilling(ownBilling)
{
ajaxProcessAddJQ ("<%= request.getContextPath() %>/extensions/adminportal/inc/save_own_billing.jsp", 'form' ,
{hiringTeamID : <%= hiringTeam.getID().longValue() %>, ownBilling : ownBilling},
function () {},
function (jqXHR, textStatus, errorThrown) {
if (jqXHR.status === 0) {
log("Empty Response. Status : " + jqXHR.status + " TextStatus : " + textStatus);
} else {
window.alert("Error processing request:" + errorThrown);
}
},
"POST");
if(ownBilling === true)
{
$('#billing_label').removeClass("show");
$('#billing_label').addClass("hide");
$('#billing_team').removeClass("show");
$('#billing_team').addClass("hide");
}
else
{
$('#billing_label').removeClass("hide");
$('#billing_label').addClass("show");
$('#billing_team').removeClass("hide");
$('#billing_team').addClass("show");
}
}
</script> </script>
<div class="container-fluid"> <div class="container-fluid">
...@@ -149,9 +119,9 @@ ...@@ -149,9 +119,9 @@
<div class="col-md-6"> <div class="col-md-6">
<label><oneit:label GUIName="Will this team manage its own billing?" /></label> <label><oneit:label GUIName="Will this team manage its own billing?" /></label>
</div> </div>
<div id="billing_label" class="<%= "col-md-6 " + (hiringTeam.getManageOwnBilling() ? "hide" : "show") %>" > <oneit:recalcClass htmlTag="div" classScript="hiringTeam.getManageOwnBilling() ? 'show': 'hide'" hiringTeam="<%= hiringTeam %>">
<label><oneit:label GUIName="Which team will manage the billing?"/></label> <label><oneit:label GUIName="Which team will manage the billing?"/></label>
</div> </oneit:recalcClass>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
...@@ -166,28 +136,6 @@ ...@@ -166,28 +136,6 @@
</label> </label>
</div> </div>
</div> </div>
</div>
<div class="form-group row">
<%
String trueID = hiringTeam.getObjectID() + "_Y";
String falseID = hiringTeam.getObjectID() + "_N";
String trueSelected = CollectionUtils.equals(hiringTeam.getManageOwnBilling(), Boolean.TRUE) ? "checked" : "";
String falseSelected = CollectionUtils.equals(hiringTeam.getManageOwnBilling(), Boolean.FALSE) ? "checked" : "";
%>
<div class="col-md-6">
<div class="radio radio-primary second-radio-primary">
<input type="radio" name="<%= hiringTeam.getObjectID() %>" value="true" id="<%= trueID %>" <%= trueSelected %> onchange="saveOwnBilling(true);"/>
<label for="<%= trueID %>">
Yes
</label>
</div>
<div class="radio radio-primary second-radio-primary">
<input type="radio" name="<%= hiringTeam.getObjectID() %>" value="false" id="<%= falseID %>" <%= falseSelected %> onchange="saveOwnBilling(false);"/>
<label for="<%= falseID %>">
No
</label>
</div>
</div>
<div id="billing_team" class="<%= "col-md-6 " + (hiringTeam.getManageOwnBilling() ? "hide" : "show") %>" > <div id="billing_team" class="<%= "col-md-6 " + (hiringTeam.getManageOwnBilling() ? "hide" : "show") %>" >
<div class="wider-select"> <div class="wider-select">
<tagfile:ormsingleasso_select obj="<%= hiringTeam %>" assocName="BillingTeam" options="<%= Utils.getOtherHiringTeams(hiringTeam) %>"/> <tagfile:ormsingleasso_select obj="<%= hiringTeam %>" assocName="BillingTeam" options="<%= Utils.getOtherHiringTeams(hiringTeam) %>"/>
......
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