4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF (template_id) %]Edit ([% template_id | html %])[% ELSE %]New[% END %] › Templates › Patron card creator › Tools › Koha</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' %]
13 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
16 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
22 <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
25 <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Templates</a>
28 <a href="#" aria-current="page">
29 [% IF (template_id) %]
30 Edit ([% template_id | html %])
39 <div class="main container-fluid">
41 <div class="col-sm-10 col-sm-push-2">
44 [% INCLUDE 'patroncards-toolbar.inc' %]
45 <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
46 <h3>[% IF (template_id) %]Edit[% ELSE %]Create[% END %] patron card template[% IF (template_id) %] ([% template_id | html %])[% END %]</h3>
48 <div class="col-sm-6">
49 <fieldset class="rows">
52 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
55 <label for="template_code">Template code:</label>
56 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
59 <label for="template_desc">Template description:</label>
60 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
63 <label for="units">Units:</label>
64 <select id="units" name="units">
65 [% FOREACH unit IN units %]
67 [% IF ( unit.selected ) %]
68 <option value="[% unit.type | html %]" selected="selected">
70 <option value="[% unit.type | html %]">
73 [% SWITCH unit.type %]
75 <span>PostScript points</span>
79 <span>US Inches</span>
81 <span>SI Millimeters</span>
83 <span>SI Centimeters</span>
91 <label for="page_height">Page height:</label>
92 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
95 <label for="page_width">Page width:</label>
96 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
99 <label for="card_height">Card height:</label>
100 <input type="text" size="4" name="card_height" id="card_height" value="[% card_height | html %]" />
103 <label for="card_width">Card width:</label>
104 <input type="text" size="4" name="card_width" id="card_width" value="[% card_width | html %]" />
111 <div class="col-sm-6">
112 <fieldset class="rows">
114 <label for="top_margin">Top page margin:</label>
115 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
118 <label for="left_margin">Left page margin:</label>
119 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
122 <label for="cols">Number of columns:</label>
123 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
126 <label for="rows">Number of rows:</label>
127 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
130 <label for="col_gap">Gap between columns:</label>
131 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
134 <label for="row_gap">Gap between rows:</label>
135 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
139 <label for="profile_id">Profile:</label>
140 [% IF ( profile_list ) %]
141 <select id="profile_id" name="profile_id">
142 [% FOREACH profile_lis IN profile_list %]
143 [% IF ( profile_lis.selected ) %]
144 <option value="[% profile_lis.profile_id | html %]" selected="selected">
146 <option value="[% profile_lis.profile_id | html %]">
148 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
153 <a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Define a printer profile.</a>
161 <fieldset class="action">
162 <input type="submit" class="submit" value="Save" />
163 <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a>
164 <input type="hidden" name="op" value="save" />
165 [% IF ( template_id ) %]
166 <input type="hidden" name="template_id" value="[% template_id | html %]" />
172 </div> <!-- /.col-sm-10.col-sm-push-2 -->
174 <div class="col-sm-2 col-sm-pull-10">
176 [% INCLUDE 'tools-menu.inc' %]
178 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
179 </div> <!-- /.row -->
181 [% MACRO jsinclude BLOCK %]
182 [% Asset.js("js/tools-menu.js") | $raw %]
184 $(document).ready(function(){
185 var selectedUnit = $("#units option:selected").attr("value");
186 var unitfields = $("#page_height,#page_width,#card_width,#card_height,#top_margin,#left_margin,#col_gap,#row_gap");
187 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
188 $("#units").change(function(){
189 $(".unit").html(getUnit($(this).val()));
191 function getUnit(unit){
217 [% INCLUDE 'intranet-bottom.inc' %]