From 5567a1a6d4e19436609614b8820dbc304ed9f0a8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 15 Feb 2024 10:24:02 +0100 Subject: [PATCH] Bug 34478: Regression - fix change auth type Signed-off-by: Jonathan Druart --- authorities/authorities.pl | 8 ++++++-- .../prog/en/modules/authorities/authorities.tt | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 0d19045ebb..3da263b74f 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -543,8 +543,12 @@ my $myindex = $input->param('index'); my $linkid=$input->param('linkid'); my $authtypecode = $input->param('authtypecode'); my $breedingid = $input->param('breedingid'); -my $changed_authtype = $input->param('changed_authtype') // q{}; +my $changed_authtype; +if ( $op eq 'cud-change-framework' ) { + $op = $input->param('original_op'); + $changed_authtype = 1; +} my $dbh = C4::Context->dbh; if(!$authtypecode) { @@ -636,7 +640,7 @@ if ($op eq "cud-add") { $authid = ""; } - if ( $changed_authtype eq "changed" ) { + if ( $changed_authtype ) { $record = TransformHtmlToMarc( $input, 0 ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt index 8c03d9967a..61a9adb541 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -106,9 +106,8 @@ $(".change-authtype").on("click", function(){ var authtypecode = $(this).data("authtypecode"); var f = document.f; - f.op.value = "[% op | html %]"; + f.op.value = "cud-change-framework"; f.authid.value = "[% authid | html %]"; - f.changed_authtype.value = "changed"; f.authtypecode.value = authtypecode; f.submit(); }); @@ -431,6 +430,7 @@
[% INCLUDE 'csrf-token.inc' %] + -- 2.39.5