Bug 42231: (QA follow-up) Show item title in note and suspend-hold modals

The static 'hidden' attribute on #addNoteTitle and #suspendHoldTitle was never
removed, so the item title was populated but stayed invisible.

- Toggle 'hidden' off when a modal is populated with a title
- Toggle 'hidden' on when a modal is closed/cleared

Test plan:
- Enable AllowCheckoutNotes
- OPAC > Summary > Checked out: click 'Add note', confirm the item title shows
- OPAC > Summary > Holds: click 'Suspend', confirm the item title shows
- Reopen each modal on a different item, confirm the title updates
- Run an accessibility checker, confirm no empty-heading errors return

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-06-19 14:35:41 +02:00 committed by Lucas Gass
parent 74e3c9f987
commit 93d9e0abe8
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 4 additions and 0 deletions

View File

@ -1178,11 +1178,13 @@
var reserve_id = $(this).data("reserve_id");
$("#suspendHoldReserveId").val(reserve_id);
$("#suspendHoldTitle").html("<em>" + title + "</em>");
$("#suspendHoldTitle").prop("hidden", false);
$("#suspendHoldModal").modal("show");
});
$("#suspendHoldModal").on("hidden.bs.modal", function () {
$("#suspendHoldTitle").html("");
$("#suspendHoldTitle").prop("hidden", true);
$("#suspendHoldReserveId").val("");
suspend_until_date.clear();
});
@ -1358,6 +1360,7 @@
$("#addNote").val(note);
$("#addNoteIssueId").val(issue_id);
$("#addNoteTitle").text(title);
$("#addNoteTitle").prop("hidden", false);
$("#addNoteModal").modal("show");
});
@ -1371,6 +1374,7 @@
$("#addNoteModal").on("hidden.bs.modal", function () {
$("#addNoteTitle").text("");
$("#addNoteTitle").prop("hidden", true);
$("#addNote").val("");
});