Bugzilla – Attachment 128482 Details for
Bug 29419
Suggest for purchase clears item type, quantity, library and reason if bib exists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29419: Retain user's inputs when suggesting for purchase and match found
Bug-29419-Retain-users-inputs-when-suggesting-for-.patch (text/plain), 7.71 KB, created by
Lucas Gass (lukeg)
on 2021-12-13 19:45:08 UTC
(
hide
)
Description:
Bug 29419: Retain user's inputs when suggesting for purchase and match found
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2021-12-13 19:45:08 UTC
Size:
7.71 KB
patch
obsolete
>From 37f7b76ba582cdaf824d2423aa25c710c167415e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 Nov 2021 11:55:08 +0100 >Subject: [PATCH] Bug 29419: Retain user's inputs when suggesting for purchase > and match found > >If a user suggests for purchase and a match is found, their inputs was >not retained: quantity, item type, library, reason. > >Test plan: >1. Suggest for purchase >2. Fill the title in with a string that will match an existing record >3. Fill value in quantity, item type, library and reason input/dropdown >4. Submit >=> Notice that with this patch the values you entered are retained on >the confirmation screen > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../bootstrap/en/modules/opac-suggestions.tt | 24 ++++++++++++------- > 1 file changed, 16 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index 043441d8ce..6e721f7dfb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -163,11 +163,11 @@ > <li id="opac-suggestion-quantity"> > [% IF ( quantity_required ) %] > <label for="quantity" class="required">Quantity:</label> >- <input type="text" id="quantity" name="quantity" required="required" maxlength="4" size="4" /> >+ <input type="text" id="quantity" name="quantity" required="required" maxlength="4" size="4" value="[% quantity | html %]" /> > <span class="required">Required</span> > [% ELSE %] > <label for="quantity">Quantity:</label> >- <input type="text" id="quantity" name="quantity" maxlength="4" size="4" /> >+ <input type="text" id="quantity" name="quantity" maxlength="4" size="4" value="[% quantity | html %]" /> > [% END %] > </li> > [% END %] >@@ -175,11 +175,11 @@ > <li> > [% IF ( itemtype_required ) %] > <label for="itemtype" class="required">Item type:</label> >- [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, required = 1, blank = 1 %] >+ [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, required = 1, blank = 1, default=itemtype %] > <span class="required">Required</span> > [% ELSE %] > <label for="itemtype">Item type:</label> >- [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, blank = 1 %] >+ [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, blank = 1, default=itemtype %] > [% END %] > </li> > [% END %] >@@ -188,13 +188,13 @@ > [% IF ( branchcode_required ) %] > <label for="branch" class="required">Library:</label> > <select name="branchcode" id="branch" required="required"> >- [% PROCESS options_for_libraries libraries => Branches.all %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %] > </select> > <span class="required">Required</span> > [% ELSE %] > <label for="branch">Library:</label> > <select name="branchcode" id="branch"> >- [% PROCESS options_for_libraries libraries => Branches.all %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %] > </select> > [% END %] > </li> >@@ -207,7 +207,11 @@ > <select name="patronreason" id="patronreason" required="required"> > <option value="">-- Choose --</option> > [% FOREACH patron_reason_loo IN patron_reason_loop %] >- <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option> >+ [% IF patron_reason_loo.authorised_value == patronreason %] >+ <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option> >+ [% ELSE %] >+ <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option> >+ [% END %] > [% END %] > </select> > <span class="required">Required</span> >@@ -216,7 +220,11 @@ > <select name="patronreason" id="patronreason"> > <option value="">-- Choose --</option> > [% FOREACH patron_reason_loo IN patron_reason_loop %] >- <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option> >+ [% IF patron_reason_loo.authorised_value == patronreason %] >+ <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option> >+ [% ELSE %] >+ <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option> >+ [% END %] > [% END %] > </select> > [% END %] >-- >2.20.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 29419
:
127684
|
128482
|
128700