Bug 21186: (follow-up) Incorrect Bootstrap modal event name in multiple templates
authorOwen Leonard <oleonard@myacpl.org>
Thu, 25 Oct 2018 15:24:29 +0000 (15:24 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 29 Nov 2018 10:47:00 +0000 (11:47 +0100)
This patch addresses a few more instances of this problem which I didn't
catch in my first pass.

To test, apply the patch and clear your browser cache if necessary.

- Go to Circulation -> Check in and check in an item which has a hold.
  - When the 'Hold found' modal appears the checkin barcode field
    behind it should be disabled.
  - When the modal is dismissed the checkin field should be enabled
    again and focus should be on that field.

- Go to Administration -> Library groups.
  - Click the "Add group" button. The cursor focus should be on the
    title field.

- Go to Tools -> MARC modification templates.
  - Click the "New template" button. The cursor focus should be on the
    name field.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b94399131614a304b3a0282ec8a85194cc72b3cf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5f7a2c92138ee44cf24d14cb52602bd490b89f2d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js

index 57a744f..372dac6 100644 (file)
@@ -46,9 +46,9 @@ function Dopop(link) {
     $("#barcode").focus();
 }
 $(document).ready(function () {
-    $(".modal").modal({ backdrop: 'static' }).on('shown', function() {
+    $(".modal").modal({ backdrop: 'static' }).on('shown.bs.modal', function() {
         $("#barcode").prop("disabled", true);
-    }).on('hidden', function() {
+    }).on('hidden.bs.modal', function() {
         $("#barcode").prop("disabled", false).focus();
     });
 
index 8ca256b..1d4659f 100644 (file)
@@ -61,7 +61,7 @@ $(document).ready(function() {
         $("#duplicate_current_template").val(1);
     });
 
-    $('#createTemplate').on('shown', function (e) {
+    $('#createTemplate').on('shown.bs.modal', function (e) {
         e.preventDefault();
         $("#template_name").focus();
     });