Browse Source

Bug 26753: Set focus for cursor to password field on Overdrive login popup on OPAC

This patch modifies the OverDrive login process so that clicking the
"Log in to your OverDrive account" link automatically puts the focus on
the password field when the modal displays.

Unrelated change: A redundant "document.ready" function has been
removed.

To test you must have OverDrive credentials set in system preferences.

 - Log in to the OPAC.
 - On the "Your summary" page, open the "OverDrive account" tab.
 - Click the "Log in to your OverDrive account" link.
 - A modal dialog should appear, and the cursor focus should
   automatically be on the password field.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Owen Leonard 4 years ago
committed by Jonathan Druart
parent
commit
b08444d31c
  1. 2
      koha-tmpl/opac-tmpl/bootstrap/en/includes/overdrive-login.inc
  2. 4
      koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js

2
koha-tmpl/opac-tmpl/bootstrap/en/includes/overdrive-login.inc

@ -11,7 +11,7 @@
<div class="modal-body">
<fieldset class="brief">
<label for="ODpassword">Password:</label>
<input type="password" name="ODpassword" value="" />
<input type="password" name="ODpassword" id="ODpassword" value="" />
</fieldset>
</div>
<div class="modal-footer">

4
koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js

@ -95,9 +95,11 @@ KOHA.OverDriveCirculation = new function() {
var ODpassword = $("input[name='ODpassword']").val();
login( ODpassword );
});
$("#overdrive-login").on("shown.bs.modal", function(){
$("#ODpassword").focus();
});
$( document ).ready(function() {
var p = window.opener;
var cb;
if (p) {

Loading…
Cancel
Save