Bug 42781: Declare 'name' before using it in patron-format.js

The code in koha-tmpl/intranet-tmpl/prog/js/patron-format.js uses
a variable called 'name' without declaring it first. The declaration
was removed in bug 32176. No deterioration of functionality has been
discovered in connection with this, but the declaration should be
restored.

To test:
- Apply the patch.
- HidePatronName = Show
- Look at the staff detail view for a record that has at least one
  item on loan.
- Verify the name of the patron is displayed as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Magnus Enger 2026-06-08 10:28:49 +02:00 committed by Pedro Amorim
parent 4979f23cb1
commit 98459bab8c
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@
"</span>";
}
var name;
var firstname = escape_str(patron.firstname);
var preferred_name = escape_str(patron.preferred_name);
var surname = escape_str(patron.surname);