Bug 34478: Changes for tools/upload-images
First upload form does not submit (ajax processing). Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
03941cc684
commit
4f63ac9dff
|
|
@ -183,8 +183,7 @@
|
|||
<div class="col-sm-12">
|
||||
[% END %]
|
||||
|
||||
<form method="post" action="/cgi-bin/koha/tools/upload-cover-image.pl" id="uploadfile" enctype="multipart/form-data">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<form method="get" action="/cgi-bin/koha/tools/upload-cover-image.pl" id="uploadfile" enctype="multipart/form-data">
|
||||
<fieldset class="rows" >
|
||||
<div id="fileuploadform">
|
||||
<label for="fileToUpload">Select the file to upload: </label>
|
||||
|
|
@ -209,6 +208,7 @@
|
|||
|
||||
<form method="post" id="processfile" action="/cgi-bin/koha/tools/upload-cover-image.pl" enctype="multipart/form-data">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-process" />
|
||||
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
|
||||
|
||||
[% IF itemnumber %]
|
||||
|
|
|
|||
|
|
@ -67,10 +67,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
my $filetype = $input->param('filetype');
|
||||
my $biblionumber = $input->param('biblionumber');
|
||||
my $itemnumber = $input->param('itemnumber');
|
||||
#my $uploadfilename = $input->param('uploadfile'); # obsolete?
|
||||
my $replace = !C4::Context->preference("AllowMultipleCovers")
|
||||
|| $input->param('replace');
|
||||
my $op = $input->param('op');
|
||||
my $replace = !C4::Context->preference("AllowMultipleCovers")
|
||||
|| $input->param('replace');
|
||||
my $op = $input->param('op') // q{};
|
||||
|
||||
my $error;
|
||||
|
||||
|
|
@ -99,7 +98,7 @@ $template->param(
|
|||
my $total = 0;
|
||||
my @results;
|
||||
|
||||
if ($fileID) {
|
||||
if ( $op eq 'cud-process' & $fileID ) {
|
||||
my $upload = Koha::UploadedFiles->find( $fileID );
|
||||
if ( $filetype eq 'image' ) {
|
||||
my $fh = $upload->file_handle;
|
||||
|
|
|
|||
Loading…
Reference in New Issue