Bug 26627: (QA follow-up) Remove barcode input by id
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 5 Nov 2020 11:40:42 +0000 (06:40 -0500)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 6 Nov 2020 14:55:18 +0000 (15:55 +0100)
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index 51d2b30..4ebc4cd 100644 (file)
 
                                                 <div class="modal-footer">
                                                     <input type="hidden" name="cancel_reserve" value="0" />
-                                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
+                                                    <input id="confirm-hold-barcode" type="hidden" name="barcode" value="[% barcode | html %]" />
 
                                                     <button type="submit" class="btn btn-default approve" data-dismiss="modal">
                                                         <i class="fa fa-check"></i> Confirm hold
 
             $('.print').on("click",function(e){
                 this.form.print_slip.value = 1;
-                this.form.barcode.remove();
+                let barcode = document.getElementById('confirm-hold-barcode');
+                if ( barcode ) barcode.remove();
                 this.form.submit();
             });