[Koha] Patron save button dissabled after adding JS to addbiblio

Alvaro Cornejo cornejo.alvaro at gmail.com
Sun Jun 14 05:43:57 NZST 2020


I´m trying to make this JS work in 19.11.06, even though it is noted to
work on 16.05.

The JS was supposed to be enabled only on cataloging form, however, it
locks/disables the save button in patron creations form. Any idea what's
wrong with it?


This is the part of the JS that locks me down:

if ( $("#cat_addbiblio") ) // only do this in the addbiblio form
  // add an additional event handler to the save buttons ( one already
exists: .onOption() )
  $("#saverecord, #saveandview, #saveanditems, #saveandcontinue").click(
function( event ) {
    var mes = "";
    // run all tests as functions which might add a new error message to
the existing ones
    mes = test020a( mes );
    mes = test022a( mes );
    mes = test024a( mes );
    mes = test856a( mes );

    if (mes != "") {
      event.stopImmediatePropagation(); // block the other event handlers
which trigger submission of the form
      return false;
    } else {
      return true;
};   // end if in addbiblio form



 Stay safe / Cuídate/  Reste sécurisé
*7* Switch off as you go / Apaga lo que no usas /  Débranchez au fur et à
 *q *Recycle always / Recicla siempre / Recyclez toujours
 P Print only if absolutely necessary / Imprime solo si es necesario /
Imprimez seulement si nécessaire

More information about the Koha mailing list