Bugzilla – Attachment 36778 Details for
Bug 13818
Editing and saving a course reserve displays the add item form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13818 - Editing and saving a course reserve displays the add item form
Bug-13818---Editing-and-saving-a-course-reserve-di.patch (text/plain), 3.60 KB, created by
Kyle M Hall (khall)
on 2015-03-10 18:26:52 UTC
(
hide
)
Description:
Bug 13818 - Editing and saving a course reserve displays the add item form
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-03-10 18:26:52 UTC
Size:
3.60 KB
patch
obsolete
>From 78141e635f0496ea0d8d1b5913939b468c447d6f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 10 Mar 2015 14:25:48 -0400 >Subject: [PATCH] Bug 13818 - Editing and saving a course reserve displays the add item form > >If one chooses to edit an existing course reserve for an item, saving it >should go back to the course details, but instead displays the "add >items: scan barcode" form. > >Test Plan: >1) Edit a course reserve >2) Save it >3) Note you get the "add items: scan barcode" form >4) Apply this patch >5) Repeat steps 1 and 2 >6) Note you are now redirected back to the course details page >--- > course_reserves/add_items.pl | 7 +++++++ > .../en/modules/course_reserves/add_items-step2.tt | 1 + > .../en/modules/course_reserves/course-details.tt | 2 +- > 3 files changed, 9 insertions(+), 1 deletions(-) > >diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl >index 0a96860..ecae625 100755 >--- a/course_reserves/add_items.pl >+++ b/course_reserves/add_items.pl >@@ -35,6 +35,7 @@ my $cgi = new CGI; > my $action = $cgi->param('action') || ''; > my $course_id = $cgi->param('course_id') || ''; > my $barcode = $cgi->param('barcode') || ''; >+my $return = $cgi->param('return') || ''; > > my $item = GetBiblioFromItemNumber( undef, $barcode ); > >@@ -73,6 +74,7 @@ if ( $action eq 'lookup' ) { > locations => GetAuthorisedValues('LOC'), > itypes => GetItemTypes( style => 'array' ), > branches => GetBranchesLoop(), >+ return => $return, > ); > > } elsif ( $action eq 'add' ) { >@@ -90,6 +92,11 @@ if ( $action eq 'lookup' ) { > staff_note => $cgi->param('staff_note'), > public_note => $cgi->param('public_note'), > ); >+ >+ if ( $return ) { >+ print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=$return"); >+ exit; >+ } > } > > output_html_with_http_headers $cgi, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >index 96bf783..2ec285f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >@@ -18,6 +18,7 @@ > > <form method="post" action="/cgi-bin/koha/course_reserves/add_items.pl"> > <input type="hidden" name="course_id" value="[% course.course_id %]" /> >+ <input type="hidden" name="return" value="[% return %]" /> > <input type="hidden" name="action" value="add" /> > > <fieldset class="rows"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index 1c6a9cb..252520c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -155,7 +155,7 @@ > <td>[% cr.public_note %]</td> > > [% IF CAN_user_coursereserves_add_reserves %] >- <td><a href="add_items.pl?course_id=[% course.course_id %]&barcode=[% cr.item.barcode %]&action=lookup">Edit</a></td> >+ <td><a href="add_items.pl?course_id=[% course.course_id %]&barcode=[% cr.item.barcode %]&action=lookup&return=[% course.course_id %]">Edit</a></td> > [% END %] > > [% IF CAN_user_coursereserves_delete_reserves %] >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13818
:
36778
|
36790
|
36791