Bugzilla – Attachment 46370 Details for
Bug 4912
After editing private list, user should be redirect to private lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 4912: Redirect to the appropriate view after editing/deleting a list
PASSED-QA-Bug-4912-Redirect-to-the-appropriate-vie.patch (text/plain), 4.91 KB, created by
Katrin Fischer
on 2016-01-06 22:19:11 UTC
(
hide
)
Description:
[PASSED QA] Bug 4912: Redirect to the appropriate view after editing/deleting a list
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-01-06 22:19:11 UTC
Size:
4.91 KB
patch
obsolete
>From c4bfafb6ca10820e38a7c3d2660a1806b6896796 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 6 Jan 2016 14:25:14 +0000 >Subject: [PATCH] [PASSED QA] Bug 4912: Redirect to the appropriate view after > editing/deleting a list >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >There are 2 places where a list can be edited/deleted: on the list view >and the list content view. After the edition, the user expect to be >redirect to the previous page. >This patch implements that. > >Test plan: >At the OPAC, delete and edit a list from the 2 differents places. >Confirm that you are redirect to the page you come from. > >With patch, redirects work as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 5 ++++- > opac/opac-shelves.pl | 4 ++-- > 2 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index a92a5cb..564bbe1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -177,6 +177,7 @@ > <span class="sep">|</span> > <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> > <input type="hidden" name="op" value="edit_form" /> >+ <input type="hidden" name="referer" value="view" /> > <input type='hidden' name='category' value='[% category %]' /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> > <input type="submit" class="editshelf" value="Edit list" /> >@@ -184,6 +185,7 @@ > > <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline"> > <input type="hidden" name="op" value="delete" /> >+ <input type="hidden" name="referer" value="list" /> > <input type='hidden' name='category' value='[% category %]' /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> > <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> >@@ -194,6 +196,7 @@ > [% ELSIF category == PRIVATE # not manageshelf and private means shared %] > <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline"> > <input type="hidden" name="op" value="remove_share" /> >+ <input type="hidden" name="referer" value="list" /> > <input type='hidden' name='category' value='[% category %]' /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> > <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" /> >@@ -545,7 +548,7 @@ > [% ELSE %] > <legend>Editing <em>[% shelf.shelfname |html %]</em></legend> > <input type="hidden" name="op" value="edit" /> >- <input type="hidden" name="referer" value="view" /> >+ <input type="hidden" name="referer" value="[% referer %]" /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> > [% END %] > <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" /> >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index 067eb10..ef54de3 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -84,11 +84,11 @@ if ( $op eq 'add_form' ) { > push @messages, { type => 'error', code => 'error_on_insert' }; > } else { > push @messages, { type => 'message', code => 'success_on_insert' }; >- $op = 'view'; >+ $op = $referer; > } > } else { > push @messages, { type => 'error', code => 'unauthorized_on_insert' }; >- $op = 'list'; >+ $op = $referer; > } > } elsif ( $op eq 'edit' ) { > $shelfnumber = $query->param('shelfnumber'); >-- >1.9.1
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 4912
:
2274
|
2773
|
7631
|
7646
|
7923
|
7932
|
46329
|
46332
| 46370