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 %]
19 <div id="doc3" class="yui-t2">
24 [% INCLUDE 'patroncards-toolbar.inc' %]
25 <div class="yui-u first">
29 <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
31 <h3>[% IF (template_id) %]Edit[% ELSE %]Create[% END %] patron card template[% IF (template_id) %] ([% template_id | html %])[% END %]</h3>
32 <div class="yui-u first">
33 <fieldset class="rows">
36 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
39 <label for="template_code">Template code:</label>
40 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
43 <label for="template_desc">Template description:</label>
44 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
47 <label for="units">Units:</label>
48 <select id="units" name="units">
49 [% FOREACH unit IN units %]
51 [% IF ( unit.selected ) %]
52 <option value="[% unit.type | html %]" selected="selected">
54 <option value="[% unit.type | html %]">
57 [% SWITCH unit.type %]
59 <span>PostScript Points</span>
61 <span>Adobe Agates</span>
63 <span>US Inches</span>
65 <span>SI Millimeters</span>
67 <span>SI Centimeters</span>
75 <label for="page_height">Page height:</label>
76 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
79 <label for="page_width">Page width:</label>
80 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
83 <label for="card_height">Card height:</label>
84 <input type="text" size="4" name="card_height" id="card_height" value="[% card_height | html %]" />
87 <label for="card_width">Card width:</label>
88 <input type="text" size="4" name="card_width" id="card_width" value="[% card_width | html %]" />
96 <fieldset class="rows">
98 <label for="top_margin">Top page margin:</label>
99 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
102 <label for="left_margin">Left page margin:</label>
103 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
106 <label for="cols">Number of columns:</label>
107 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
110 <label for="rows">Number of rows:</label>
111 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
114 <label for="col_gap">Gap between columns:</label>
115 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
118 <label for="row_gap">Gap between rows:</label>
119 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
123 <label for="profile_id">Profile:</label>
124 [% IF ( profile_list ) %]
125 <select id="profile_id" name="profile_id">
126 [% FOREACH profile_lis IN profile_list %]
127 [% IF ( profile_lis.selected ) %]
128 <option value="[% profile_lis.profile_id | html %]" selected="selected">
130 <option value="[% profile_lis.profile_id | html %]">
132 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
137 <a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Click here to define a printer profile.</a>
145 <fieldset class="action">
146 <input type="submit" class="submit" value="Save" />
147 <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a>
148 <input type="hidden" name="op" value="save" />
149 [% IF ( template_id ) %]
150 <input type="hidden" name="template_id" value="[% template_id | html %]" />
158 [% INCLUDE 'tools-menu.inc' %]
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' %]