Bug 36099: count and holdcount template vars into JS vars should default to 0 if empty
Visit: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4321 Notice you have 2 console errors: 1) Uncaught SyntaxError: Unexpected token ';' 2) Uncaught ReferenceError: biblionumber is not defined Apply patch. Repeat. Notice no error shows. Visit an existing biblionumber. Confirm all is well. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> (cherry picked from commitf94d763b6a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitd4e1ea5d71) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
5bfa038652
commit
a140d42c7b
|
|
@ -3,8 +3,8 @@
|
|||
<script>
|
||||
/* Some required variables from the template */
|
||||
var biblionumber = [% biblionumber | html %];
|
||||
var count = [% count | html %];
|
||||
var holdcount = [% holdcount | html %];
|
||||
var count = [% count || 0 | html %];
|
||||
var holdcount = [% holdcount || 0 | html %];
|
||||
[% SET orders = biblio.orders %]
|
||||
[% SET current = Context.Scalar(orders, "filter_by_current") %]
|
||||
[% SET cancelled = Context.Scalar(orders, "filter_by_cancelled") %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue