Bug 41574: (QA follow-up) Rename shadowing batch_id variables

- The top-level const batch_id (from TT) is shadowed by var
  batch_id inside the .export and #savedesc click handlers
- Rename to export_batch_id and save_batch_id respectively
  to make the intent clear

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Paul Derscheid 2026-03-06 16:32:23 +01:00 committed by Lucas Gass
parent 14167ad785
commit 78744f7008
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 5 additions and 5 deletions

View File

@ -355,18 +355,18 @@
});
$(".export").on("click", function (e) {
e.preventDefault();
var label_id = $(this).data("label-id");
var batch_id = $(this).data("batch-id");
location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=" + batch_id + "&label_id=" + label_id;
var export_label_id = $(this).data("label-id");
var export_batch_id = $(this).data("batch-id");
location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=" + export_batch_id + "&label_id=" + export_label_id;
});
$("#savedesc").click(function (event) {
event.preventDefault(); // prevent form submission
var newdescription = $('input[name="description"]').val();
var batch_id = $(this).data("batch_id");
var save_batch_id = $(this).data("batch_id");
var ajaxData = {
newdescription: newdescription,
batch_id: batch_id,
batch_id: save_batch_id,
op: "cud-set_permission",
csrf_token: $('meta[name="csrf-token"]').attr("content"),
};