3 [% PROCESS 'i18n.inc' %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% FILTER collapse %]
7 [% IF ( template_id ) %]
8 [% t("Edit patron card template") | html %] ([% template_id | html %])
10 [% t("New patron card template") | html %]
12 [% t("Templates") | html %] ›
13 [% t("Patron card creator") | html %] ›
14 [% t("Tools") | html %] ›
15 [% t("Koha") | html %]
17 [% INCLUDE 'doc-head-close.inc' %]
20 <body id="pcard_edit-template" class="tools pcard">
21 [% WRAPPER 'header.inc' %]
22 [% INCLUDE 'cat-search.inc' %]
25 [% WRAPPER 'sub-header.inc' %]
26 [% WRAPPER breadcrumbs %]
27 [% WRAPPER breadcrumb_item %]
28 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
30 [% WRAPPER breadcrumb_item %]
31 <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
33 [% WRAPPER breadcrumb_item %]
34 <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Templates</a>
36 [% WRAPPER breadcrumb_item bc_active= 1 %]
37 [% IF (template_id) %]
38 <span>Edit patron card template ([% template_id | html %])</span>
40 <span>New patron card template</span>
43 [% END #/ WRAPPER breadcrumbs %]
44 [% END #/ WRAPPER sub-header.inc %]
46 <div class="main container-fluid">
48 <div class="col-sm-10 col-sm-push-2">
51 [% INCLUDE 'patroncards-toolbar.inc' %]
53 [% IF (template_id) %]
54 <span>Edit patron card template</span>
56 <span>New patron card template</span>
58 [% IF (template_id) %] ([% template_id | html %])[% END %]
60 <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
62 <div class="col-sm-6">
63 <fieldset class="rows">
66 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
69 <label for="template_code">Template code:</label>
70 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
73 <label for="template_desc">Template description:</label>
74 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
77 <label for="units">Units:</label>
78 <select id="units" name="units">
79 [% FOREACH unit IN units %]
81 [% IF ( unit.selected ) %]
82 <option value="[% unit.type | html %]" selected="selected">
84 <option value="[% unit.type | html %]">
87 [% SWITCH unit.type %]
89 <span>PostScript points</span>
93 <span>US Inches</span>
95 <span>SI Millimeters</span>
97 <span>SI Centimeters</span>
105 <label for="page_height">Page height:</label>
106 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
109 <label for="page_width">Page width:</label>
110 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
113 <label for="card_height">Card height:</label>
114 <input type="text" size="4" name="card_height" id="card_height" value="[% card_height | html %]" />
117 <label for="card_width">Card width:</label>
118 <input type="text" size="4" name="card_width" id="card_width" value="[% card_width | html %]" />
125 <div class="col-sm-6">
126 <fieldset class="rows">
128 <label for="top_margin">Top page margin:</label>
129 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
132 <label for="left_margin">Left page margin:</label>
133 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
136 <label for="cols">Number of columns:</label>
137 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
140 <label for="rows">Number of rows:</label>
141 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
144 <label for="col_gap">Gap between columns:</label>
145 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
148 <label for="row_gap">Gap between rows:</label>
149 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
153 <label for="profile_id">Profile:</label>
154 [% IF ( profile_list ) %]
155 <select id="profile_id" name="profile_id">
156 [% FOREACH profile_lis IN profile_list %]
157 [% IF ( profile_lis.selected ) %]
158 <option value="[% profile_lis.profile_id | html %]" selected="selected">
160 <option value="[% profile_lis.profile_id | html %]">
162 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
167 <a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Define a printer profile.</a>
175 <fieldset class="action">
176 <input type="submit" class="btn btn-primary" value="Save" />
177 <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a>
178 <input type="hidden" name="op" value="save" />
179 [% IF ( template_id ) %]
180 <input type="hidden" name="template_id" value="[% template_id | html %]" />
186 </div> <!-- /.col-sm-10.col-sm-push-2 -->
188 <div class="col-sm-2 col-sm-pull-10">
190 [% INCLUDE 'tools-menu.inc' %]
192 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
193 </div> <!-- /.row -->
195 [% MACRO jsinclude BLOCK %]
196 [% Asset.js("js/tools-menu.js") | $raw %]
198 $(document).ready(function(){
199 var selectedUnit = $("#units option:selected").val();
200 var unitfields = $("#page_height,#page_width,#card_width,#card_height,#top_margin,#left_margin,#col_gap,#row_gap");
201 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
202 $("#units").change(function(){
203 $(".unit").html(getUnit($(this).val()));
205 function getUnit(unit){
231 [% INCLUDE 'intranet-bottom.inc' %]