mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Convert GET routes to POST.
This commit is contained in:
18
public/v1/js/ff/list/groups.js
vendored
18
public/v1/js/ff/list/groups.js
vendored
@@ -23,6 +23,7 @@ var count = 0;
|
||||
$(document).ready(function () {
|
||||
updateListButtons();
|
||||
addSort();
|
||||
$('.clone-transaction').click(cloneTransaction);
|
||||
});
|
||||
|
||||
var fixHelper = function (e, tr) {
|
||||
@@ -206,4 +207,19 @@ function updateActionButtons() {
|
||||
if (0 === count) {
|
||||
$('.action-menu').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
function cloneTransaction(e) {
|
||||
var button = $(e.currentTarget);
|
||||
var groupId = parseInt(button.data('id'));
|
||||
|
||||
$.post(cloneGroupUrl, {
|
||||
_token: token,
|
||||
id: groupId
|
||||
}).done(function (data) {
|
||||
// lame but it works
|
||||
location.href = data.redirect;
|
||||
}).fail(function () {
|
||||
console.error('I failed :(');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user