View | Details | Raw Unified | Return to bug 37614
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt (-3 / +2 lines)
Lines 61-69 Link Here
61
                        [% IF ( multi_batch_count == 1 ) %]<span>1 batch to export</span>[% ELSE %]<span>[% multi_batch_count | html %] batches to export</span>[% END %]
61
                        [% IF ( multi_batch_count == 1 ) %]<span>1 batch to export</span>[% ELSE %]<span>[% multi_batch_count | html %] batches to export</span>[% END %]
62
                    [% END %]
62
                    [% END %]
63
            </h3>
63
            </h3>
64
            <form id="exportingf" name="exporting" method="post" action="/cgi-bin/koha/patroncards/print.pl">
64
            <form id="exportingf" name="exporting" method="get" action="/cgi-bin/koha/patroncards/print.pl">
65
                [% INCLUDE 'csrf-token.inc' %]
65
                <input type="hidden" name="op" value="export" />
66
                <input type="hidden" name="op" value="cud-export" />
67
                <input type="hidden" name="referer" value="[% referer | html %]" />
66
                <input type="hidden" name="referer" value="[% referer | html %]" />
68
                [% FOREACH batch_id IN batch_ids %]
67
                [% FOREACH batch_id IN batch_ids %]
69
                    <input type="hidden" name="batch_id" value="[% batch_id.batch_id | html %]" />
68
                    <input type="hidden" name="batch_id" value="[% batch_id.batch_id | html %]" />
(-)a/patroncards/print.pl (-6 / +5 lines)
Lines 56-65 my $multi_batch_count = scalar(@batch_ids); Link Here
56
my $card_count = scalar(@label_ids);
56
my $card_count = scalar(@label_ids);
57
my $borrower_count = scalar(@borrower_numbers);
57
my $borrower_count = scalar(@borrower_numbers);
58
58
59
if ($op eq 'cud-export') {    #FIXME Seems like a GET operation?
59
if ($op eq 'export') {
60
    if (@label_ids) {
60
    if (@label_ids) {
61
        my $label_id_param = '&amp;label_id=';
61
        my $label_id_param = '&label_id=';
62
        $label_id_param .= join ('&amp;label_id=',@label_ids);
62
        $label_id_param .= join ('&label_id=',@label_ids);
63
        push (@batches, {create_script   => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'),    #FIXME csv not supported, no script?
63
        push (@batches, {create_script   => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'),    #FIXME csv not supported, no script?
64
                         batch_id        => $batch_ids[0],
64
                         batch_id        => $batch_ids[0],
65
                         template_id     => $template_id,
65
                         template_id     => $template_id,
Lines 75-82 if ($op eq 'cud-export') { #FIXME Seems like a GET operation? Link Here
75
                        );
75
                        );
76
    }
76
    }
77
    elsif (@borrower_numbers) {
77
    elsif (@borrower_numbers) {
78
        my $borrower_number_param = '&amp;borrower_number=';
78
        my $borrower_number_param = '&borrower_number=';
79
        $borrower_number_param .= join ('&amp;borrower_number=',@borrower_numbers);
79
        $borrower_number_param .= join ('&borrower_number=',@borrower_numbers);
80
        push (@batches, {create_script   => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'),    #FIXME csv not supported, no script?
80
        push (@batches, {create_script   => ($output_format eq 'pdf' ? 'create-pdf.pl' : 'create-csv.pl'),    #FIXME csv not supported, no script?
81
                         template_id     => $template_id,
81
                         template_id     => $template_id,
82
                         layout_id       => $layout_id,
82
                         layout_id       => $layout_id,
83
- 

Return to bug 37614