From 8a20c96b6f4db9e5ade58278c72ba9237e2cbc22 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 1 Mar 2024 10:46:41 +0100 Subject: [PATCH] Bug 34478: serials/routing-preview.pl Not totally done, still need the "save and preview" Signed-off-by: Jonathan Druart --- .../en/modules/serials/routing-preview.tt | 30 ++++++++++++++----- serials/routing-preview.pl | 10 +++---- 2 files changed, 27 insertions(+), 13 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 62fbd984ed..daabf1eef1 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 @@ -32,10 +32,6 @@

Preview routing list for [% title | html %]

-
- [% INCLUDE 'csrf-token.inc' %] - -
  1. Issue:[% issue | html %]
  2. @@ -50,9 +46,29 @@
- - -
+ + [% INCLUDE 'csrf-token.inc' %] + + + + +
+ +
+ [% INCLUDE 'csrf-token.inc' %] + + + + +
+ +
+ [% INCLUDE 'csrf-token.inc' %] + + + + +
diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl index ab19aefcef..c44c496488 100755 --- a/serials/routing-preview.pl +++ b/serials/routing-preview.pl @@ -36,19 +36,17 @@ my $query = CGI->new; my $subscriptionid = $query->param('subscriptionid'); my $issue = $query->param('issue'); my $routingid; -my $ok = $query->param('ok'); -my $edit = $query->param('cud-edit'); -my $delete = $query->param('cud-delete'); +my $op = $query->param('op') || q{}; my $dbh = C4::Context->dbh; -if($delete){ +if($op eq 'cud-delete'){ delroutingmember($routingid,$subscriptionid); my $sth = $dbh->prepare("UPDATE serial SET routingnotes = NULL WHERE subscriptionid = ?"); $sth->execute($subscriptionid); print $query->redirect("routing.pl?subscriptionid=$subscriptionid&op=new"); } -if($edit){ +if($op eq 'cud-edit'){ print $query->redirect("routing.pl?subscriptionid=$subscriptionid"); } @@ -58,7 +56,7 @@ my ($tmp ,@serials) = GetSerials($subscriptionid); my ($template, $loggedinuser, $cookie); my $library; -if($ok){ +if($op eq 'cud-save_and_preview'){ # get biblio information.... my $biblionumber = $subs->{'bibnum'}; -- 2.39.5