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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7b02715f4f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Magnus Enger 2026-06-08 10:28:49 +02:00 committed by Baptiste Wojtkowski
parent f581158da2
commit 76857ac5e2
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
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);