That’s it! Thank you very much, Eric. :)
Best
Holger
Von: Eric Phetteplace [mailto:ephetteplace@cca.edu]
Gesendet: Mittwoch, 7. Februar 2018 19:11
An: Holger Meissner
Cc: koha-devel@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":

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 |
vault.cca.edu | 510.594.3660

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@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@cca.edu]
Gesendet: Mittwoch, 7. Februar 2018 18:06
An: Holger Meissner
Cc: koha-devel@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 |
vault.cca.edu | 510.594.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@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, Fax:
+49 234 77727-254
E-Mail: holger.meissner@hs-gesundheit.de, Web:
www.hs-gesundheit.de
_______________________________________________
Koha-devel mailing list
Koha-devel@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@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/