@@ -, +, @@ --- authorities/authorities.pl | 5 +++ .../prog/en/modules/authorities/authorities.tt | 39 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) --- a/authorities/authorities.pl +++ a/authorities/authorities.pl @@ -543,6 +543,7 @@ 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 $dbh = C4::Context->dbh; @@ -634,6 +635,10 @@ if ($op eq "duplicate") { $authid = ""; } + if($changed_authtype eq "changed"){ + $record = TransformHtmlToMarc( $input, 0 ); + } + build_tabs ($template, $record, $dbh, $input); build_hidden_data; $template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -79,6 +79,16 @@ selectTab( tablink ); window.scrollTo( 0, getScrollto( field, "toolbar" ) ); }); + + $(".change-authtype").on("click", function(){ + var authtypecode = $(this).data("authtypecode"); + var f = document.f; + f.op.value = "[% op | html %]"; + f.authid.value = "[% authid | html %]"; + f.changed_authtype.value = "changed"; + f.authtypecode.value = authtypecode; + f.submit(); + }); }); function selectTab( tablink ){ @@ -314,6 +324,7 @@ +
Save
@@ -325,6 +336,34 @@ [% END %]
+ + +
+
[% IF ( authid ) %] Cancel [% ELSE %] --