Bug 40025: Fix change type for edit item metadata

1) Enable ILLModule
2) Create a new ILL request:
   <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Add a type, a cardnumber '42' and any library. Click 'Make request'.
4) You should now be on the 'Manage request' page. Click 'Edit item metadata'.
5) Change the type. Notice the form doesn't update the fields (as it does when you create a new ILL request).
6) Apply patch. Repeat step 5. Notice the form now updates the fields as it does when you create a new ILL request.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2025-05-29 12:34:31 +00:00 committed by Lucas Gass
parent 6f147f4116
commit 585f66e07c
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 8 additions and 4 deletions

View File

@ -24,10 +24,14 @@ document.addEventListener("DOMContentLoaded", function () {
$(event.target).parent().remove();
});
$("#type").change(function () {
$("#create_form").prepend(
'<input type="hidden" name="change_type" value="1" />'
);
$("#create_form").submit();
$("#create_form, #standard_edit_form")
.first()
.submit(function () {
$(this).prepend(
'<input type="hidden" name="change_type" value="1" />'
);
})
.submit();
});
$("#standard-fields").on("keyup", ".custom-name", function () {
var val = $(this).val();