Bug 24201: (QA follow-up) Replace library select
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 7 Aug 2020 14:38:54 +0000 (15:38 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 7 Aug 2020 14:54:40 +0000 (16:54 +0200)
Removing the library select entirely results in a JS failure for desk
selection when independant branches is enabled and the user does not
have permission to select a library.

This patch adds a hidden select element so we can still grab the current
branch from the selection.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt

index 3d358bd..4859bdb 100644 (file)
@@ -74,7 +74,12 @@ Updated:<ul>
         </select></li>
     </ol>
 </fieldset>
+[% ELSE %]
+<select name="branch" id="branch" style="visibility:hidden;">
+    [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
+</select>
 [% END %]
+
 [% IF Koha.Preference('UseCirculationDesks') && Desks.all %]
 <fieldset class="rows">
     <legend>Set desk</legend>