From ac45d3b0246e8c7e2590ffd820a43e76570ae02e Mon Sep 17 00:00:00 2001
From: Fridolin Somers <fridolin.somers@biblibre.com>
Date: Wed, 16 Jun 2021 11:17:19 +0200
Subject: [PATCH] Bug 28569: In opac-suggestions.pl preselect user library

In OPAC new purchase suggestion opac-suggestions.pl for library combobox :
actually first value is selected, user library should be selected.

Test plan :
1) Create a new library named 'ZZZ top'
2) Set this library on a user U1
2) Loggin at OPAC with user U1
3) Create a new suggestion
=> Check library 'ZZZ top' is preselected
---
 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 4 ++--
 1 file changed, 2 insertions(+), 2 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 c9e824faef..da0f03ceb9 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
@@ -186,13 +186,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( selected => branchcode ) %]
+                                                        [% PROCESS options_for_libraries libraries => Branches.all %]
                                                     </select>
                                                     <span class="required">Required</span>
                                                 [% ELSE %]
                                                     <label for="branch">Library:</label>
                                                     <select name="branchcode" id="branch">
-                                                        [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
+                                                        [% PROCESS options_for_libraries libraries => Branches.all %]
                                                     </select>
                                                 [% END %]
                                             </li>
-- 
2.30.2