Bug 16778: Replace usage of Greybox modals with Bootstrap modals
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / print.tt
blob26912548282f5544a96636fda3f4b265c8c6b566
1     [% INCLUDE 'doc-head-open.inc' %]
2     <title>Koha &rsaquo; Tools &rsaquo; Patron cards &rsaquo; Patron card printing/exporting</title>
3     [% INCLUDE 'doc-head-close.inc' popup => 1%]
4     <script type="text/javascript">
5         //<![CDATA[
6             function Done() {
7                 window.location = "[% referer %]";
8             };
9             $(document).ready(function(){
10                 $(".gb-close").on("click",function(){
11                     parent.parent.GB_hide();
12                 });
13             })
14         //]]>
15     </script>
16     <style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
17 </head>
18 <body id="pcard_print" class="tools pcard">
19     <div id="custom-doc">
20         <div id="bd">
21             [% IF ( batches ) %]
22             <form>
23                 <h3>Click on the following link(s) to download the exported batch(es).</h3>
24                     <fieldset>
25                     [% FOREACH batche IN batches %]
26                         [% IF ( batche.label_ids ) %]
27                         <legend>[% batche.card_count %] Single patron cards</legend>
28                         <p>
29                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/[% batche.create_script %]?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_card=[% batche.start_card %][% batche.label_ids %]">label_single_[% batche.card_count %].pdf</a>
30                         </p>
31                         [% ELSIF ( batche.borrower_numbers ) %]
32                         <legend>[% batche.card_count %] Single Patron Cards</legend>
33                         <p>
34                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/[% batche.create_script %]?template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_card=[% batche.start_card %][% batche.borrower_numbers %]">label_single_[% batche.card_count %].pdf</a>
35                         </p>
36                         [% ELSE %]
37                         <legend>Card batch number [% batche.batch_id %]</legend>
38                         <p>
39                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_card=[% batche.start_card %]">label_batch_[% batche.batch_id %].pdf</a>
40                         </p>
41                         [% END %]
42                     [% END %]
43                     </fieldset>
45                 <fieldset class="action">
46                     <input type="button" class="gb-close" value="Done" />
47                 </fieldset>
48             </form>
49             [% ELSIF ( patronlist_id && template_id && layout_id ) %]
50                 <h3>Click on the link to download the patron cards from the patron list.</h3>
51                     <p>
52                         <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id %]&amp;template_id=[% template_id %]&amp;layout_id=[% layout_id %]&amp;start_card=[% start_card %]">label_patronlist_[% patronlist_id %].pdf</a>
53                     </p>
54             [% ELSE %]
55             <h3>
56                     [% IF ( label_ids ) %]
57                         [% IF ( card_count == 1 ) %]Exporting [% card_count %] patron card[% ELSE %]Exporting [% card_count %] patron cards[% END %]
58                     [% ELSIF ( borrower_numbers ) %]
59                         [% IF ( borrower_count == 1 ) %]Exporting [% borrower_count %] patron card[% ELSE %]Exporting [% borrower_count %] patron cards[% END %]
60                     [% ELSIF ( patronlist_id ) %] Exporting from patron list
61                     [% ELSE %]
62                         [% IF ( multi_batch_count == 1 ) %][% multi_batch_count %] batch to export[% ELSE %][% multi_batch_count %] batches to export[% END %]
63                     [% END %]
64             </h3>
65             <form id="exportingf" name="exporting" method="post" action="/cgi-bin/koha/patroncards/print.pl">
66                 <input type="hidden" name="op" value="export" />
67                 <input type="hidden" name="referer" value="[% referer %]" />
68                 [% FOREACH batch_id IN batch_ids %]
69                     <input type="hidden" name="batch_id" value="[% batch_id.batch_id %]" />
70                 [% END %]
71                 [% FOREACH label_id IN label_ids %]
72                     <input type="hidden" name="label_id" value="[% label_id.label_id %]" />
73                 [% END %]
74                 [% FOREACH borrower_number IN borrower_numbers %]
75                     <input type="hidden" name="borrower_number" value="[% borrower_number.borrower_number %]" />
76                 [% END %]
77                 [% IF (patronlist_id) %] <input type="hidden" name="patronlist_id" value="[% patronlist_id %]" /> [% END %]
78                 <fieldset class="rows">
79                     <ol>
80                         <li>
81                             <label style="width:9em" for="template_id">Select a template to be applied: </label>
82                             <select name="template_id" id="template_id">
83                                 [% FOREACH template IN templates %]
84                                 <option value="[% template.template_id %]">[% template.template_code %]</option>
85                                 [% END %]
86                             </select>
87                         </li>
88                         <li>
89                             <label style="width:9em" for="layout_id">Select a layout to be applied: </label>
90                             <select name="layout_id" id="layout_id">
91                                 [% FOREACH layout IN layouts %]
92                                 <option value="[% layout.layout_id %]">[% layout.layout_name %]</option>
93                                 [% END %]
94                             </select>
95                         </li>
96                         <li>
97                             <label style="width:9em" for="start_card">Enter starting card position: </label>
98                             <input type="text" size="5" id="start_card" name="start_card" class="focus" title="Starting card number" value="1" />
99                         </li>
100                     </ol>
101                 </fieldset>
102                 <fieldset class="action">
103                     <input type="submit" value="Export" />
104                     <a href="#" class="cancel gb-close">Cancel</a>
105                 </fieldset>
106             </form>
107             [% END %]
108         </div>
109     </div>
110     [% INCLUDE 'popup-bottom.inc' %]