From 647d59b44980d2198c7329ce3348bc5f0c6c3cc2 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 23 Feb 2024 10:41:02 +0000 Subject: [PATCH] Bug 34478: import_export_authtype - cud-import, export Changing action to op. Signed-off-by: Jonathan Druart --- admin/import_export_authtype.pl | 7 +++---- koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/import_export_authtype.pl b/admin/import_export_authtype.pl index a30b2ce411..bc1d2ec432 100755 --- a/admin/import_export_authtype.pl +++ b/admin/import_export_authtype.pl @@ -41,10 +41,10 @@ unless ($auth_status eq 'ok') { } my $authtypecode = $input->param('authtypecode') || 'default'; -my $action = $input->param('action') || 'cud-export'; +my $op = $input->param('op') || 'export'; ## Exporting -if ($action eq 'cud-export' && $input->request_method() eq 'GET') { +if ( $op eq 'export' ) { # GET operation for downloading my $strXml = ''; my $format = $input->param('type_export_' . $authtypecode); if ($authtypecode eq 'default') { @@ -68,8 +68,7 @@ if ($action eq 'cud-export' && $input->request_method() eq 'GET') { print $input->header(-type => 'application/vnd.oasis.opendocument.spreadsheet', -attachment => 'export_' . $authtypecode . '.ods'); print $strODS; } -## Importing -} elsif ($input->request_method() eq 'POST') { +} elsif ( $op eq 'cud-import' ) { # POST for importing my $ok = -1; my $fieldname = 'file_import_' . $authtypecode; if ($authtypecode eq 'default'){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt index 5896a00924..e34da549e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt @@ -237,6 +237,7 @@