From ec5d46f4a14bfa1136449ae23d3af31913d3e9cf Mon Sep 17 00:00:00 2001
From: Julian Maurice <julian.maurice@biblibre.com>
Date: Fri, 21 Aug 2015 11:02:00 +0200
Subject: [PATCH] [SIGNED-OFF] Bug 7957: Redirect after creating a new routing
 list

This avoids creating the same list multiple times when reloading the
page

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Have made a couple of small changes to your patch.
1) "There is no routing lists for this subscription" -> changed to "There are no"
2) When I click Preview and choose a serial (up to Step 9 in test plan), there is a link to another system preference which I assume$
---
 installer/data/mysql/sysprefs.sql                               |    2 +-
 koha-tmpl/intranet-tmpl/prog/en/modules/serials/routinglists.tt |    2 +-
 serials/routinglist.pl                                          |    3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql
index 96ea9ad..b9f7654 100644
--- a/installer/data/mysql/sysprefs.sql
+++ b/installer/data/mysql/sysprefs.sql
@@ -402,7 +402,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
 ('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
 ('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
-('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
+('RoutingListNote','To change this note edit RoutingListNote system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
 ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
 ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
 ('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routinglists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routinglists.tt
index 11ab8d8..fb866fe 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routinglists.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routinglists.tt
@@ -57,7 +57,7 @@ function confirmDelete(){
         </tbody>
       </table>
       [% ELSE %]
-        <p>There is no routing lists for this subscription.</p>
+        <p>There are no routing lists for this subscription.</p>
       [% END %]
 
     </div>
diff --git a/serials/routinglist.pl b/serials/routinglist.pl
index f8455d3..d1e4b86 100755
--- a/serials/routinglist.pl
+++ b/serials/routinglist.pl
@@ -64,6 +64,9 @@ if($op && $op eq 'savenew') {
     my $subscriptionid = $input->param('subscriptionid');
 
     $routinglistid = AddRoutingList($subscriptionid, $title);
+    print $input->redirect('/cgi-bin/koha/serials/routinglist.pl?routinglistid='
+        . $routinglistid);
+    exit;
 } else {
     $routinglistid = $input->param('routinglistid');
 }
-- 
1.7.10.4