Bugzilla – Attachment 122583 Details for
Bug 28175
Usability improvements to uploads page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28175: (follow-up) Preselect correct category after search
Bug-28175-follow-up-Preselect-correct-category-aft.patch (text/plain), 2.81 KB, created by
Katrin Fischer
on 2021-07-03 21:43:35 UTC
(
hide
)
Description:
Bug 28175: (follow-up) Preselect correct category after search
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-07-03 21:43:35 UTC
Size:
2.81 KB
patch
obsolete
>From 6eed7c702f2e628bf161680ee2435ec5e970b11b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 22 Jun 2021 19:09:23 +0000 >Subject: [PATCH] Bug 28175: (follow-up) Preselect correct category after > search > >This patch modifies the script and template so that if the user submits >a search by category, that category will be preselected on the search >results page. > >Also added is an empty "Choose" option so that a search category isn't >selected by default. > >To test, apply the patch and view the uploads page. > > - In the category search form, a "Choose" option should be selected. > Submitting the form without selecting a category should not work. > - Search using one of your existing categories. On the search results > page the category you selected should remain selected. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt | 13 +++++++++---- > tools/upload.pl | 7 ++++--- > 2 files changed, 13 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >index c907fdf007..03f1f567a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >@@ -120,10 +120,15 @@ > <ol> > <li> > <label for="browsecategory">Category: </label> >- <select id="browsecategory" name="browsecategory"> >- [% FOREACH cat IN uploadcategories %] >- <option value="[% cat.code | html %]">[% cat.name | html %]</option> >- [% END %] >+ <select id="browsecategory" name="browsecategory" required="required"> >+ <option value="">Choose</option> >+ [% FOREACH cat IN uploadcategories %] >+ [% IF cat.code == browsecategory %] >+ <option value="[% cat.code | html %]" selected="selected">[% cat.name | html %]</option> >+ [% ELSE -%] >+ <option value="[% cat.code | html %]">[% cat.name | html %]</option> >+ [% END %] >+ [% END %] > </select> > </li> > </ol> >diff --git a/tools/upload.pl b/tools/upload.pl >index cf9a2c6053..c01d57f925 100755 >--- a/tools/upload.pl >+++ b/tools/upload.pl >@@ -69,9 +69,10 @@ if ( $op eq 'new' ) { > } > > $template->param( >- mode => 'report', >- msg => $msg, >- uploads => $uploads, >+ mode => 'report', >+ msg => $msg, >+ uploads => $uploads, >+ browsecategory => $browsecategory, > ); > output_html_with_http_headers $input, $cookie, $template->output; > >-- >2.11.0
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 28175
:
119907
|
120025
|
120121
|
122302
|
122581
|
122582
| 122583