3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Patron card creator › Templates › [% IF (template_id) %]Edit ([% template_id %])[% ELSE %]New[% END %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
8 <body id="pcard_edit-template" class="tools pcard">
9 [% INCLUDE 'header.inc' %]
10 [% INCLUDE 'cat-search.inc' %]
11 <div id="breadcrumbs">
12 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
13 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
14 <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> ›
15 <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Templates</a> ›
16 [% IF (template_id) %]Edit ([% template_id %])[% ELSE %]New[% END %]
18 <div id="doc3" class="yui-t2">
23 [% INCLUDE 'patroncards-toolbar.inc' %]
24 <div class="yui-u first">
28 <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
30 <h3>[% IF (template_id) %]Edit[% ELSE %]Create[% END %] patron card template[% IF (template_id) %] ([% template_id %])[% END %]</h3>
31 <div class="yui-u first">
32 <fieldset class="rows">
35 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id %][% ELSE %]N/A[% END %]
38 <label for="template_code">Template code:</label>
39 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code %]" />
42 <label for="template_desc">Template description:</label>
43 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc %]</textarea>
46 <label for="units">Units:</label>
47 <select id="units" name="units">
48 [% FOREACH unit IN units %]
50 [% IF ( unit.selected ) %]
51 <option value="[% unit.type %]" selected="selected">
53 <option value="[% unit.type %]">
56 [% SWITCH unit.type %]
58 <span>PostScript Points</span>
60 <span>Adobe Agates</span>
62 <span>US Inches</span>
64 <span>SI Millimeters</span>
66 <span>SI Centimeters</span>
74 <label for="page_height">Page height:</label>
75 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height %]" />
78 <label for="page_width">Page width:</label>
79 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width %]" />
82 <label for="card_height">Card height:</label>
83 <input type="text" size="4" name="card_height" id="card_height" value="[% card_height %]" />
86 <label for="card_width">Card width:</label>
87 <input type="text" size="4" name="card_width" id="card_width" value="[% card_width %]" />
95 <fieldset class="rows">
97 <label for="top_margin">Top page margin:</label>
98 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin %]" />
101 <label for="left_margin">Left page margin:</label>
102 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin %]" />
105 <label for="cols">Number of columns:</label>
106 <input type="text" size="4" name="cols" id="cols" value="[% cols %]" />
109 <label for="rows">Number of rows:</label>
110 <input type="text" size="4" name="rows" id="rows" value="[% rows %]" />
113 <label for="col_gap">Gap between columns:</label>
114 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap %]" />
117 <label for="row_gap">Gap between rows:</label>
118 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap %]" />
122 <label for="profile_id">Profile:</label>
123 [% IF ( profile_list ) %]
124 <select id="profile_id" name="profile_id">
125 [% FOREACH profile_lis IN profile_list %]
126 [% IF ( profile_lis.selected ) %]
127 <option value="[% profile_lis.profile_id %]" selected="selected">
129 <option value="[% profile_lis.profile_id %]">
131 [% profile_lis.printer_name %]/[% profile_lis.paper_bin %]
136 <a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Click here to define a printer profile.</a>
144 <fieldset class="action">
145 <input type="submit" class="submit" value="Save" />
146 <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a>
147 <input type="hidden" name="op" value="save" />
148 [% IF ( template_id ) %]
149 <input type="hidden" name="template_id" value="[% template_id %]" />
157 [% INCLUDE 'tools-menu.inc' %]
161 [% MACRO jsinclude BLOCK %]
162 [% Asset.js("js/tools-menu.js") %]
164 $(document).ready(function(){
165 var selectedUnit = $("#units option:selected").attr("value");
166 var unitfields = $("#page_height,#page_width,#card_width,#card_height,#top_margin,#left_margin,#col_gap,#row_gap");
167 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
168 $("#units").change(function(){
169 $(".unit").html(getUnit($(this).val()));
171 function getUnit(unit){
197 [% INCLUDE 'intranet-bottom.inc' %]