move adjust transaction to POST http verb.

This commit is contained in:
Keith Woodlock
2012-05-29 22:50:52 +01:00
parent 92b3ed4030
commit 4b6d4666f0
3 changed files with 4 additions and 4 deletions
@@ -690,7 +690,7 @@ $(document).ready(function() {
var ids = loanAndRepaymentId.split("_");
var loanId = ids[0];
var transactionId = ids[1];
var getAndPutUrl = baseApiUrl + 'loans/' + loanId + '/transactions/' + transactionId;
var getAndPostUrl = baseApiUrl + 'loans/' + loanId + '/transactions/' + transactionId;
var templateSelector = "#transactionLoanFormTemplate";
var width = 500;
@@ -702,7 +702,7 @@ $(document).ready(function() {
$newtabs.tabs('load', currentTabIndex);
}
popupDialogWithFormView(getAndPutUrl, getAndPutUrl, 'PUT', "dialog.title.adjust.loan.repayment", templateSelector, width, height, saveSuccessFunction);
popupDialogWithFormView(getAndPostUrl, getAndPostUrl, 'POST', "dialog.title.adjust.loan.repayment", templateSelector, width, height, saveSuccessFunction);
e.preventDefault();
});
$('button.adjustloanrepayment span').text(jQuery.i18n.prop('dialog.button.adjust.loan.repayment'));
@@ -827,7 +827,7 @@
<input type="hidden" id="dateFormat" name="dateFormat" value="dd MMMM yyyy" />
<label for="transactionDate"><spring:message code="label.loan.transaction.on"/></label>
<input id="transactionDate" name="transactionDate" class="text ui-widget-content ui-corner-all" title="" class="datepickerfield" value="{{=$ctx.globalDate(date)}}"/>
<input id="transactionDate" name="transactionDate" class="text ui-widget-content ui-corner-all datepickerfield" title=""d value="{{=$ctx.globalDate(date)}}"/>
<label for="transactionAmount"><spring:message code="label.loan.transaction.amount"/></label>
<input id="transactionAmount" name="transactionAmount" class="text ui-widget-content ui-corner-all" title="" value="{{=$ctx.money(total)}}" />
@@ -319,7 +319,7 @@ public class LoansApiResource {
uriInfo.getQueryParameters());
}
@PUT
@POST
@Path("{loanId}/transactions/{transactionId}")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Produces({ MediaType.APPLICATION_JSON})