From d13741429e84d8a283cdf7962fdbf4ac3135b52b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 May 2023 10:02:39 +0200 Subject: [PATCH] Bug 33784: Don't display the multi receive form for single receive With bug 8179, a new step was added when receiving a single item. This extra step is not useful and adds clicks for the staff member who is receiving orders. Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/acqui/orderreceive.tt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index a2281a6fa53..7bbffea00be 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -621,10 +621,15 @@ "searchable": false, "orderable": false, "render": function(data, type, row, meta) { - return ' '+EDIT+''; + return ' '+EDIT+''; } } - ] + ], + [% IF multiple_orders.split(',').size == 1 %] + "drawCallback": function( settings ) { + $(this).find("tbody tr td:last-child a.order_edit_toggle").click(); + }, + [% END %] }; var orders_table = $("#multiple_orders").kohaTable(options); var api = orders_table.api(); @@ -1293,6 +1298,9 @@ var saved_rows = save_row(); if(Object.keys(saved_rows).length) $('.save').prop('disabled', false); $("#order_edit").modal('hide'); + [% IF multiple_orders.split(',').size == 1 %] + $(".save").click(); + [% END %] }) $("#order_edit").on("show.bs.modal", function (event) { -- 2.34.1