From a70ca64715ad9b7fe83e40f580592a7efc1849a8 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. --- .../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 3548bc4aa67..25d5a2e9b47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -577,10 +577,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(); @@ -1231,6 +1236,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.25.1