use warnings;
use strict;
-use CGI;
+use CGI qw ( -utf8 );
use Graphics::Magick;
use POSIX qw(ceil);
use autouse 'Data::Dumper' => qw(Dumper);
use C4::Auth;
use C4::Output;
use C4::Debug;
-use C4::Creators::Lib 1.000000 qw(html_table);
-use C4::Patroncards::Lib 1.000000 qw(put_image get_image rm_image);
+use C4::Creators;
+use C4::Patroncards;
my $cgi = CGI->new;
my ($template, $loggedinuser, $cookie) = get_template_and_user({
- template_name => "patroncards/image-manage.tmpl",
+ template_name => "patroncards/image-manage.tt",
query => $cgi,
type => "intranet",
authnotrequired => 0,
my $file_name = $cgi->param('uploadfile') || '';
my $upload_file = $cgi->upload('uploadfile') || '';
my $op = $cgi->param('op') || 'none';
-my @image_ids = $cgi->param('image_id') if $cgi->param('image_id');
+my @image_ids = $cgi->multi_param('image_id') if $cgi->param('image_id');
my $source_file = "$file_name"; # otherwise we end up with what amounts to a pointer to a filehandle rather than a user-friendly filename
my $display_columns = { image => [ #{db column => {label => 'col label', is link? }},
{image_id => {label => 'ID', link_field => 0}},
{image_name => {label => 'Name', link_field => 0}},
+ {_delete => {label => 'Delete', link_field => 0}},
{select => {label => 'Select', value => 'image_id'}},
],
};
SOURCE_FILE => $source_file,
IMAGE_NAME => $image_name,
TABLE => $table,
- error => 1,
- $errstr => 1,
+ error => $errstr,
);
}
else {
SOURCE_FILE => $source_file,
IMAGE_NAME => $image_name,
TABLE => $table,
- error => 1,
- $errstr => 1,
+ error => $errstr,
);
}
else {
SOURCE_FILE => $source_file,
IMAGE_NAME => $image_name,
TABLE => $table,
- error => 1,
- $errstr => 1,
+ error => $errstr,
image_limit => $image_limit,
);
}
DELETE_SUCCESSFULL => 0,
IMAGE_IDS => join(', ', @image_ids),
TABLE => $table,
- error => 1,
- $errstr => 1,
+ error => $errstr,
image_ids => join(',',@image_ids),
);
}
SOURCE_FILE => $source_file,
IMAGE_NAME => $image_name,
TABLE => $table,
- error => 1,
- $errstr => 1,
+ error => $errstr,
);
}
Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
-You should have received a copy of the GNU General Public License along with Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-Suite 330, Boston, MA 02111-1307 USA
+You should have received a copy of the GNU General Public License along with Koha; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+Fifth Floor, Boston, MA 02110-1301 USA.
=head1 DISCLAIMER OF WARRANTY