Bugzilla – Attachment 80364 Details for
Bug 21542
OverDrive password submission should use a password field to mask input
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21542: Use modal and password field for overdrive password
Bug-21542-Use-modal-and-password-field-for-overdri.patch (text/plain), 4.03 KB, created by
Nick Clemens (kidclamp)
on 2018-10-10 15:58:10 UTC
(
hide
)
Description:
Bug 21542: Use modal and password field for overdrive password
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-10-10 15:58:10 UTC
Size:
4.03 KB
patch
obsolete
>From 9ac1ed1012dd5777206e5f3e513d72bdfea53be5 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 10 Oct 2018 15:53:13 +0000 >Subject: [PATCH] Bug 21542: Use modal and password field for overdrive > password > >To test: > 1 - Enabled Overdrive and fill all preferences > 2 - Make sure OverDrivePasswordRequired is true > 3 - Go to opac account > 4 - Log in to overdrive > 5 - Note the input is shown > 6 - Apply patch > 7 - Repeat > 8 - Note popup is now a modal > 9 - Note password is now hidden >10 - Confirm overdrive integration works as before >--- > .../bootstrap/en/includes/overdrive-login.inc | 18 ++++++++++++++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 5 ++++- > koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js | 11 +++++++++-- > 3 files changed, 31 insertions(+), 3 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/overdrive-login.inc > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/overdrive-login.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/overdrive-login.inc >new file mode 100644 >index 0000000..116cabf >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/overdrive-login.inc >@@ -0,0 +1,18 @@ >+<div id="overdrive-login" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="overdrive-login-label" aria-hidden="true"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h3 id="overdrive-login-label">Login</h3> >+ </div> >+ <form action="#" method="post" id="overdrive-login-form"> >+ <div class="modal-body"> >+ <fieldset class="brief"> >+ <label for="ODpassword">Password:</label> >+ <input type="password" name="ODpassword" value="" /> >+ </fieldset> >+ </div> >+ <div class="modal-footer"> >+ <input type="submit" class="btn btn-primary overdrive-checkout-submit" value="Login" /> >+ <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a> >+ </div> >+ </form> <!-- /#overdrive-login-form --> >+</div> <!-- /#overdrive-login --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 1909c57..69ded6b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -900,7 +900,10 @@ > </div> <!-- /#main --> > > [% IF ( OverDriveCirculation ) %] >-[% INCLUDE 'overdrive-checkout.inc' %] >+ [% INCLUDE 'overdrive-checkout.inc' %] >+ [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %] >+ [% INCLUDE 'overdrive-login.inc' %] >+ [% END %] > [% END %] > [% IF ( RecordedBooksCirculation ) %] > [% INCLUDE 'recordedbooks-checkout.inc' %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js b/koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js >index 7063cd1..9070dc3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js >@@ -71,10 +71,11 @@ KOHA.OverDriveCirculation = new function() { > var login_link = $('<a href="#">') > .click(function(e) { > e.preventDefault(); >- var passwd = OD_password_required ? prompt("Please enter your password") : ""; >- login(passwd); >+ if( OD_password_required ) { $("#overdrive-login").modal('show'); } >+ else { login(""); } > }) > .text(_("Login to OverDrive account")); >+ > var login_div = $('<div class="overdrive-login">').append(login_link); > > var details = null; >@@ -97,6 +98,12 @@ KOHA.OverDriveCirculation = new function() { > window.close(); > } > checkout_popup = $("#overdrive-checkout"); >+ $("#overdrive-login-form").submit(function(e){ >+ e.preventDefault(); >+ $("#overdrive-login").modal('hide'); >+ var ODpassword = $("input[name='ODpassword']").val(); >+ login( ODpassword ); >+ }); > }); > > function display_account (container, data) { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21542
:
80364
|
80597