Bug 34478: Regression - fix change auth type
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
3f2a8ecf3c
commit
5567a1a6d4
2 changed files with 8 additions and 4 deletions
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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 @@
|
|||
<form method="post" id="f" name="f" action="/cgi-bin/koha/authorities/authorities.pl">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-add" />
|
||||
<input type="hidden" name="original_op" value="[% op | html %]" />
|
||||
<input type="hidden" name="addfield_field" value="" />
|
||||
<input type="hidden" name="repeat_field" value="" />
|
||||
<input type="hidden" name="authtypecode" value="[% authtypecode | html%]" />
|
||||
|
|
Loading…
Reference in a new issue