use Modern::Perl;
use CGI qw ( -utf8 );
-use Text::CSV_XS;
-use XML::Simple;
+use XML::Simple qw( XMLin XMLout );
use autouse 'Data::Dumper' => qw(Dumper);
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw(
+ get_all_image_names
+ get_barcode_types
+ get_font_types
+ get_text_justification_types
+ get_unit_values
+);
use C4::Patroncards;
my $cgi = CGI->new;
my $image_select = 0;
my $field_enabled = 0;
CGI_PARAMS:
- foreach my $parameter ($cgi->param()) { # parse the field values and build a hash of the layout for conversion to xml and storage in the db
+ foreach my $parameter ($cgi->multi_param()) { # parse the field values and build a hash of the layout for conversion to xml and storage in the db
if ($parameter =~ m/^field_([0-9])_(.*)$/) {
my $field_number = $1;
my $field_data = $2;
$field_enabled = $field_number if $field_data eq 'enable';
next CGI_PARAMS unless $field_number == $field_enabled;
if ($field_data eq 'text') {
- push @$text_lines, $cgi->param($parameter);
+ push @$text_lines, $cgi->multi_param($parameter);
if ($array_index <= 0) {
$array_index++;
}
}
elsif ($parameter =~ m/^barcode_(.*)$/) {
$field_enabled = $1 if $1 eq 'print';
- next CGI_PARAMS unless $field_enabled eq 'print';
+ next CGI_PARAMS unless defined $field_enabled && $field_enabled eq 'print';
$layout->{'barcode'}->{$1} = $cgi->param($parameter);
}
elsif ($parameter =~m/^image_([0-9])_(.*)$/) {