From b05cb8df7bd72c3a1fcaa102bd0205195ab26adc Mon Sep 17 00:00:00 2001 From: hdl Date: Fri, 18 May 2007 12:00:17 +0000 Subject: [PATCH] Adding redirection to serials-collection.pl if no serials selected for edition. --- .../intranet-tmpl/prog/en/serials/serials-collection.tmpl | 8 ++++---- serials/serials-edit.pl | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl b/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl index 74b7e7ebbf..08e1caccc3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl @@ -233,15 +233,15 @@ function popup(link) { " disabled /> - " onclick="javascript:addsubscriptionid();"/> + "/> - " onclick="javascript:addsubscriptionid();"/> + " /> - " onclick="javascript:addsubscriptionid();"/> + " /> - " onclick="javascript:addsubscriptionid();"/> + " /> diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index a1620c3fc4..0ff3a296ff 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -101,6 +101,12 @@ unless (@serialids){ } } +unless (scalar(@serialids)){ + my $string="serials-collection.pl?subscriptionid=".join(",",@subscriptionids); + $string=~s/,$//; + warn $string; + print $query->redirect($string); +} my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "serials/serials-edit.tmpl", query => $query, -- 2.39.5