From b4b7fdb5ad970bae98fbc0248f613ca47aebe7ec Mon Sep 17 00:00:00 2001 From: CJ Lynce Date: Tue, 10 Sep 2024 18:12:04 +0000 Subject: [PATCH] Bug 37873: Unable to delete user from routing list or preview/print routing list slip This patch restores the ability to delete a recipient from a serials routing list. It also fixes the slip preview when using the "Save and preview slip", and removes the koha staff intranet head from the slip when using 'Print list' from the Serial collection information screen. To test: 1) Login to the staff client. 2) Open the Serials module. 3) + New subscription to add a new serial. 4) Create a new subscription. a) Search for a record (I searched for 'dog') and chose that record. b) Under 'When receiving this serial', select 'Create an item record' c) Under the 'Item type' dropdown, select anything. d) Click Next -> (and confirm the popup). e) Select any 'First issue date'. f) Select any 'Frequency'. g) Enter a number larger than 5 in the 'Subscription length'. h) Select any 'Subscription start date'. i) Select your favorite numbering pattern. j) Verify your prediction pattern using "Test prediction pattern". k) Click "Save subscription". 5) On the 'Subscription details' screen, click "Receive". 6) Under the first volume, click "Add item" then "Save". 7) Repeat step 6 to receive one more issue. 8) On the 'Serial collection information' page click "+ Create routing list" 9) Click "+ Add recipients". 10) Search for and add several recipients. 11) Click "Close" to exit the 'Add recipients' page. 12) Click "Delete" next to any recipient. *Note that the recipient is not deleted. 13) Click "Save" on the 'Modify routing list for ...' page. 14) Click "Save and preview routing slip" button. *Note you are redirected to the Subscription details page, but no routing slip preview appears. 15) Click "Serial collection" from the left-side menu. 16) Click "Print list" on either of the issues you previously received. *Note the routing slip includes the staff intranet header, menu, etc. 17) Apply patch. 18) Return to the 'Serial collection information' screen for your subscription. 19) Click "Edit routing list". 20) Repeat steps 12-16 and verify the issues are fixed. -"Delete" button works to remove a recipient from a list. -"Save and preview routing list" button pops-up a preview before redirecting. -"Print list" pops-up a vanilla routing list to print. Sponsored-by: Westlake Porter Public Library Signed-off-by: Olivier V Signed-off-by: Martin Renvoize --- .../en/modules/serials/routing-preview.tt | 19 +++++++- .../prog/en/modules/serials/routing.tt | 48 +++++++++++++------ .../en/modules/serials/serials-collection.tt | 2 +- 3 files changed, 53 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tt index 9e03d5e40d0..7ecce93c264 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tt @@ -52,7 +52,7 @@
-
+ [% INCLUDE 'csrf-token.inc' %] @@ -88,6 +88,23 @@ [% MACRO jsinclude BLOCK %] + [% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt index 941c0177caf..4fe90136685 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt @@ -54,14 +54,10 @@

Modify routing list for [% title | html %]

[% END %] - - [% INCLUDE 'csrf-token.inc' %] - -
  1. - [% FOREACH date IN dates %] [% IF ( date.selected ) %] @@ -95,23 +91,43 @@ [% END %] - Delete + + + [% INCLUDE 'csrf-token.inc' %] + + + + +
  2. + [% END %] [% END %] -

    - Add recipients - [% IF memberloop %] - Delete all - [% END %] -

    +
    + [% INCLUDE 'csrf-token.inc' %] + + +

    + Add recipients + [% IF memberloop %] + + [% END %] +

    +
    -
  3. -
+
+ [% INCLUDE 'csrf-token.inc' %] + + + + +
  • + +
    @@ -134,6 +150,10 @@ var routingid = $(this).data("routingid"); reorder_item( subscriptionid, routingid, $(this).val()); }); + $("#date_selected").val( $("#date_selected_top").find("option:selected").val() ); + $(".date_selected_top").on("change",function(){ + $("#date_selected").val( $(this).val() ); + }); }); function reorder_item(sid,rid,rank){ var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 7d3b57beee4..7d4d6954f83 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -314,7 +314,7 @@ [% IF ( routing ) %] - Print list + Print list [% END %] -- 2.46.0