[Koha-devel] OPACUserJS, password recovery form

Holger Meissner Holger.Meissner at hs-gesundheit.de
Thu Feb 8 09:39:14 CET 2018


That’s it! Thank you very much, Eric. :)

Best
Holger

Von: Eric Phetteplace [mailto:ephetteplace at cca.edu]
Gesendet: Mittwoch, 7. Februar 2018 19:11
An: Holger Meissner
Cc: koha-devel at lists.koha-community.org
Betreff: Re: [Koha-devel] OPACUserJS, password recovery form

You've an error in your JavaScript, "Uncaught TypeError: Cannot set property 'disabled' of null":

[cid:image002.jpg at 01D3A0BF.2CEEEDD0]
​That causes everything afterwards to not execute. If you use jQuery instead of document.querySelector then the problem should go away:

$('select[id="borrower_branchcode"]').prop('disabled', true)

Best,

ERIC PHETTEPLACE

Systems Librarian



libraries.cca.edu<http://libraries.cca.edu> | vault.cca.edu<http://vault.cca.edu> | 510.594.3660

[https://www.cca.edu/sites/default/files/images/2017/02/cca-sig-logo.png]

5212 Broadway, Oakland, CA 94618

1111 8th St., San Francisco, CA 94107

Preferred Pronoun(s): he/him

:(){ :|: & };:

On Wed, Feb 7, 2018 at 9:51 AM, Holger Meissner <Holger.Meissner at hs-gesundheit.de<mailto:Holger.Meissner at hs-gesundheit.de>> wrote:
Hi Eric,

thank you, but #password-recovery has the same problem. It works in scratchpad, but not in OPACUserJS.

#opac-password-recovery is the ID of <body>.

Right now, I tried with just
alert('Hello');

and even though it shows up in the source, it’s not executed.

Best
Holger

Von: Eric Phetteplace [mailto:ephetteplace at cca.edu<mailto:ephetteplace at cca.edu>]
Gesendet: Mittwoch, 7. Februar 2018 18:06
An: Holger Meissner
Cc: koha-devel at lists.koha-community.org<mailto:koha-devel at lists.koha-community.org>
Betreff: Re: [Koha-devel] OPACUserJS, password recovery form

Hi Holger,

Looking at your password reset page, I think you need to update your selectors to target the "#password-recovery" <div>. There is no element with ID "opac-password-recovery". I'm not sure how the code is working in scratchpad but if you fix the jQuery selectors, you should get the intended effect.

Best,

ERIC PHETTEPLACE

Systems Librarian



libraries.cca.edu<http://libraries.cca.edu> | vault.cca.edu<http://vault.cca.edu> | 510.594.3660<tel:(510)%20594-3660>

5212 Broadway, Oakland, CA 94618

1111 8th St., San Francisco, CA 94107

Preferred Pronoun(s): he/him

:(){ :|: & };:

On Wed, Feb 7, 2018 at 5:33 AM, Holger Meissner <Holger.Meissner at hs-gesundheit.de<mailto:Holger.Meissner at hs-gesundheit.de>> wrote:
Dear koha devs,

login and email are identical for our patrons. I'd like to simplify password recovery by hiding one of the two inputs.

$(document).ready(function(){

$("#opac-password-recovery label[for='username']").hide();
$("#opac-password-recovery label[for='email']").hide();
$("#opac-password-recovery #email").hide();
$("#opac-password-recovery #username").before('<br /><br />');

});

This works fine in scratchpad, but has no effect in OPACUserJS.

Can anyone give me a hint?

______________________________
Holger Meißner

Bibliothek und Fachinformation
Systembibliothekar

Hochschule für Gesundheit - University of Applied Sciences
Gesundheitscampus 6-8, D-44801 Bochum, Raum C-2306
Tel: +49 234 77727-154<tel:%2B49%20234%2077727-154>, Fax: +49 234 77727-254<tel:%2B49%20234%2077727-254>
E-Mail: holger.meissner at hs-gesundheit.de<mailto:holger.meissner at hs-gesundheit.de>, Web: www.hs-gesundheit.de<http://www.hs-gesundheit.de>
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org<mailto:Koha-devel at lists.koha-community.org>
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org<mailto:Koha-devel at lists.koha-community.org>
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20180208/c9a37c4f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 5067 bytes
Desc: image002.jpg
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20180208/c9a37c4f/attachment-0001.jpg>


More information about the Koha-devel mailing list