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>
This commit is contained in:
parent
7815e37258
commit
b08444d31c
2 changed files with 5 additions and 3 deletions
|
@ -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">
|
||||
|
|
|
@ -95,9 +95,11 @@ KOHA.OverDriveCirculation = new function() {
|
|||
var ODpassword = $("input[name='ODpassword']").val();
|
||||
login( ODpassword );
|
||||
});
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
$("#overdrive-login").on("shown.bs.modal", function(){
|
||||
$("#ODpassword").focus();
|
||||
});
|
||||
|
||||
var p = window.opener;
|
||||
var cb;
|
||||
if (p) {
|
||||
|
|
Loading…
Reference in a new issue