From 8eed84fe0b15a7be33182619a0f97b1fe5e992f9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 23 Feb 2024 10:23:41 +0000 Subject: [PATCH] Bug 34478: (follow-up) patroncards: FIXMEs for op and missing script Looks like create-csv never made it. Some op's look like GET to me. Creating a pdf is just downloading. Signed-off-by: Jonathan Druart --- patroncards/edit-profile.pl | 2 +- patroncards/edit-template.pl | 2 +- patroncards/print.pl | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/patroncards/edit-profile.pl b/patroncards/edit-profile.pl index f89d3fea9f..49dd334bf6 100755 --- a/patroncards/edit-profile.pl +++ b/patroncards/edit-profile.pl @@ -45,7 +45,7 @@ my @label_template = (); my $units = get_unit_values(); -if ($op eq 'cud-edit') { +if ($op eq 'cud-edit') { # FIXME This looks like edit_form ? $profile = C4::Patroncards::Profile->retrieve(profile_id => $profile_id); $template_list = get_all_templates({ fields => [ qw( template_id template_code profile_id ) ] }); } diff --git a/patroncards/edit-template.pl b/patroncards/edit-template.pl index 847323f581..dacb4f3366 100755 --- a/patroncards/edit-template.pl +++ b/patroncards/edit-template.pl @@ -45,7 +45,7 @@ my $profile_list = undef; my $units = get_unit_values(); -if ($op eq 'cud-edit') { +if ($op eq 'cud-edit') { # FIXME This looks like edit_form $card_template = C4::Patroncards::Template->retrieve(template_id => $template_id); $profile_list = get_all_profiles({ fields => [ qw( profile_id printer_name paper_bin ) ], filters => {template_id => [ $template_id, 0 ], creator => 'Patroncards'} } ); } diff --git a/patroncards/print.pl b/patroncards/print.pl index dc7e0ee421..14c99e5387 100755 --- a/patroncards/print.pl +++ b/patroncards/print.pl @@ -56,11 +56,11 @@ my $multi_batch_count = scalar(@batch_ids); my $card_count = scalar(@label_ids); my $borrower_count = scalar(@borrower_numbers); -if ($op eq 'cud-export') { +if ($op eq 'cud-export') { #FIXME Seems like a GET operation? if (@label_ids) { my $label_id_param = '&label_id='; $label_id_param .= join ('&label_id=',@label_ids); - push (@batches, {create_script => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'), + push (@batches, {create_script => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'), #FIXME csv not supported, no script? batch_id => $batch_ids[0], template_id => $template_id, layout_id => $layout_id, @@ -77,7 +77,7 @@ if ($op eq 'cud-export') { elsif (@borrower_numbers) { my $borrower_number_param = '&borrower_number='; $borrower_number_param .= join ('&borrower_number=',@borrower_numbers); - push (@batches, {create_script => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'), + push (@batches, {create_script => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'), #FIXME csv not supported, no script? template_id => $template_id, layout_id => $layout_id, layout_back_id => $layout_back_id, @@ -92,7 +92,7 @@ if ($op eq 'cud-export') { } elsif (@batch_ids) { foreach my $batch_id (@batch_ids) { - push (@batches, {create_script => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'), + push (@batches, {create_script => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'), #FIXME csv not supported, no script? batch_id => $batch_id, template_id => $template_id, layout_id => $layout_id, -- 2.39.5