Bug 24201: (QA follow-up) Fix desks select box selected attribute
authorJosef Moravec <josef.moravec@gmail.com>
Mon, 3 Aug 2020 07:29:15 +0000 (07:29 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 7 Aug 2020 14:54:40 +0000 (16:54 +0200)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

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

index 2d734cd..3538612 100644 (file)
     <option id="nodesk" value="">---</option>
     [% FOREACH d IN desks %]
         [% IF d.branchcode == branch %]
+          [% IF selected == d.desk_id %]
+            <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" selected="selected">[% d.desk_name | html %]</option>
+          [% ELSE %]
             <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" >[% d.desk_name | html %]</option>
+          [% END %]
         [% ELSE %]
             <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" disabled hidden>[% d.desk_name | html %]</option>
         [% END%]
index 2d6242d..c511a0b 100644 (file)
@@ -79,7 +79,7 @@ Updated:<ul>
     <ol>
         <li><label for="desk">Choose Desk:</label>
         <select name="desk_id" id="desk_id">
-            [% PROCESS options_for_desks desks => Desks.all( selected => desk_id ) %]
+            [% PROCESS options_for_desks desks => Desks.all(), selected => desk_id  %]
         </select></li>
     </ol>
 </fieldset>