Bug 39300: Fix quick edit of subfields

Searching tag$subfield in the framework should redirect to the edition
of the tag with the subfield tab selected.
This has been broken when we used the wrapper for tabs on bug 33178.

Test plan:
Edit a framework
http://localhost:8081/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=
Search for 952$c
=> You are redirected to the edition of 952 and the "c" tab is selected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b1efa3d71d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2025-03-11 10:37:44 +01:00 committed by Fridolin Somers
parent 83ae6fce2e
commit fba6b70a67
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
1 changed files with 5 additions and 1 deletions

View File

@ -291,7 +291,11 @@ if ($op eq 'add_form') {
# Hidden feature: If search was field$subfield, redirect to the subfield edit form
my ( $tagfield, $tagsubfield ) = split /\$/, $searchfield;
if ( $tagsubfield ) {
print $input->redirect('/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield='.$tagfield.'&frameworkcode='.$frameworkcode.'#sub'.$tagsubfield.'field');
print $input->redirect(
sprintf
'/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=%s&frameworkcode=%s#%s_panel',
$tagfield, $frameworkcode, $tagsubfield
);
exit;
}
#here, normal old style : display every tags