Bug 34478: Rename action with op - import_export_framework

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-01-30 11:08:24 +01:00
parent e9e8d5ead8
commit 63fcbb0692
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 5 additions and 5 deletions

View file

@ -41,10 +41,10 @@ unless ($auth_status eq 'ok') {
}
my $frameworkcode = $input->param('frameworkcode') || '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') {
my $strXml = '';
my $format = $input->param('type_export_' . $frameworkcode);
if ($frameworkcode eq 'default') {
@ -68,7 +68,7 @@ if ($action eq 'cud-export' && $input->request_method() eq 'GET') {
print $strODS;
}
## Importing
} elsif ($input->request_method() eq 'POST') {
} elsif ($op eq 'cud-import') {
my $ok = -1;
my $fieldname = 'file_import_' . $frameworkcode;
my $filename = $input->param($fieldname);

View file

@ -234,7 +234,7 @@
[% INCLUDE 'csrf-token.inc' %]
<div class="modal-body">
<input type="hidden" name="frameworkcode" value="default" />
<input type="hidden" name="action" value="import" />
<input type="hidden" name="op" value="cud-import" />
<p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
<div id="importing_default" style="display:none" class="importing"><img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /><span class="importing_msg"></span></div>
</div> <!-- /.modal-body -->
@ -305,7 +305,7 @@
[% INCLUDE 'csrf-token.inc' %]
<div class="modal-body">
<input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
<input type="hidden" name="action" value="import" />
<input type="hidden" name="op" value="cud-import" />
<p><label for="file_import_[% loo.frameworkcode | html %]">Upload file:</label> <input type="file" name="file_import_[% loo.frameworkcode | html %]" id="file_import_[% loo.frameworkcode | html %]" class="input_import" /></p>
<div id="importing_[% loo.frameworkcode | html %]" style="display:none" class="importing"><img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /><span class="importing_msg"></span></div>
</div> <!-- /.modal-body -->