Bug 34478: Rename action with op - offline_circ

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-01-31 11:13:48 +01:00
parent e8d02c58d2
commit 1875d5e12e
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
2 changed files with 5 additions and 5 deletions

View File

@ -132,12 +132,12 @@
$("#operations input:checkbox").prop("checked", true );
});
$('#process,#delete').click(function() {
var action = $(this).attr("id");
var op = $(this).attr("id");
$(":checkbox[name=operationid]:checked").each(function() {
var cb = $(this);
$.ajax({
url: "process.pl",
data: { 'action': action, 'operationid': this.value },
data: { 'op': 'cud-' + op, 'operationid': this.value },
async: false,
dataType: "text",
success: function(data) {

View File

@ -34,13 +34,13 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({
});
my $operationid = $query->param('operationid');
my $action = $query->param('action');
my $op = $query->param('op') || q{};
my $result;
if ( $action eq 'process' ) {
if ( $op eq 'cud-process' ) {
my $operation = GetOfflineOperation( $operationid );
$result = ProcessOfflineOperation( $operation );
} elsif ( $action eq 'cud-delete' ) {
} elsif ( $op eq 'cud-delete' ) {
$result = DeleteOfflineOperation( $operationid );
}