4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Tools › Patron card creator › Templates › [% IF (template_id) %]Edit ([% template_id | html %])[% ELSE %]New[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="pcard_edit-template" class="tools pcard">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'cat-search.inc' %]
12 <div id="breadcrumbs">
13 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
14 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
15 <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> ›
16 <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Templates</a> ›
17 [% IF (template_id) %]Edit ([% template_id | html %])[% ELSE %]New[% END %]
20 <div class="main container-fluid">
22 <div class="col-sm-10 col-sm-push-2">
25 [% INCLUDE 'patroncards-toolbar.inc' %]
26 <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
27 <h3>[% IF (template_id) %]Edit[% ELSE %]Create[% END %] patron card template[% IF (template_id) %] ([% template_id | html %])[% END %]</h3>
29 <div class="col-sm-6">
30 <fieldset class="rows">
33 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
36 <label for="template_code">Template code:</label>
37 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
40 <label for="template_desc">Template description:</label>
41 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
44 <label for="units">Units:</label>
45 <select id="units" name="units">
46 [% FOREACH unit IN units %]
48 [% IF ( unit.selected ) %]
49 <option value="[% unit.type | html %]" selected="selected">
51 <option value="[% unit.type | html %]">
54 [% SWITCH unit.type %]
56 <span>PostScript Points</span>
58 <span>Adobe Agates</span>
60 <span>US Inches</span>
62 <span>SI Millimeters</span>
64 <span>SI Centimeters</span>
72 <label for="page_height">Page height:</label>
73 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
76 <label for="page_width">Page width:</label>
77 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
80 <label for="card_height">Card height:</label>
81 <input type="text" size="4" name="card_height" id="card_height" value="[% card_height | html %]" />
84 <label for="card_width">Card width:</label>
85 <input type="text" size="4" name="card_width" id="card_width" value="[% card_width | html %]" />
92 <div class="col-sm-6">
93 <fieldset class="rows">
95 <label for="top_margin">Top page margin:</label>
96 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
99 <label for="left_margin">Left page margin:</label>
100 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
103 <label for="cols">Number of columns:</label>
104 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
107 <label for="rows">Number of rows:</label>
108 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
111 <label for="col_gap">Gap between columns:</label>
112 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
115 <label for="row_gap">Gap between rows:</label>
116 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
120 <label for="profile_id">Profile:</label>
121 [% IF ( profile_list ) %]
122 <select id="profile_id" name="profile_id">
123 [% FOREACH profile_lis IN profile_list %]
124 [% IF ( profile_lis.selected ) %]
125 <option value="[% profile_lis.profile_id | html %]" selected="selected">
127 <option value="[% profile_lis.profile_id | html %]">
129 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
134 <a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Click here to define a printer profile.</a>
142 <fieldset class="action">
143 <input type="submit" class="submit" value="Save" />
144 <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a>
145 <input type="hidden" name="op" value="save" />
146 [% IF ( template_id ) %]
147 <input type="hidden" name="template_id" value="[% template_id | html %]" />
153 </div> <!-- /.col-sm-10.col-sm-push-2 -->
155 <div class="col-sm-2 col-sm-pull-10">
157 [% INCLUDE 'tools-menu.inc' %]
159 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
160 </div> <!-- /.row -->
162 [% MACRO jsinclude BLOCK %]
163 [% Asset.js("js/tools-menu.js") | $raw %]
165 $(document).ready(function(){
166 var selectedUnit = $("#units option:selected").attr("value");
167 var unitfields = $("#page_height,#page_width,#card_width,#card_height,#top_margin,#left_margin,#col_gap,#row_gap");
168 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
169 $("#units").change(function(){
170 $(".unit").html(getUnit($(this).val()));
172 function getUnit(unit){
198 [% INCLUDE 'intranet-bottom.inc' %]