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 [% WRAPPER 'header.inc' %]
11 [% INCLUDE 'cat-search.inc' %]
14 [% WRAPPER 'sub-header.inc' %]
15 [% WRAPPER breadcrumbs %]
16 [% WRAPPER breadcrumb_item %]
17 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
19 [% WRAPPER breadcrumb_item %]
20 <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
22 [% WRAPPER breadcrumb_item %]
23 <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Templates</a>
25 [% WRAPPER breadcrumb_item bc_active= 1 %]
26 [% IF (template_id) %]
27 <span>Edit ([% template_id | html %])</span>
32 [% END #/ WRAPPER breadcrumbs %]
33 [% END #/ WRAPPER sub-header.inc %]
35 <div class="main container-fluid">
37 <div class="col-sm-10 col-sm-push-2">
40 [% INCLUDE 'patroncards-toolbar.inc' %]
42 [% IF (template_id) %]
43 <span>Edit patron card template</span>
45 <span>Create patron card template</span>
47 [% IF (template_id) %] ([% template_id | html %])[% END %]
49 <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
51 <div class="col-sm-6">
52 <fieldset class="rows">
55 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
58 <label for="template_code">Template code:</label>
59 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
62 <label for="template_desc">Template description:</label>
63 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
66 <label for="units">Units:</label>
67 <select id="units" name="units">
68 [% FOREACH unit IN units %]
70 [% IF ( unit.selected ) %]
71 <option value="[% unit.type | html %]" selected="selected">
73 <option value="[% unit.type | html %]">
76 [% SWITCH unit.type %]
78 <span>PostScript points</span>
82 <span>US Inches</span>
84 <span>SI Millimeters</span>
86 <span>SI Centimeters</span>
94 <label for="page_height">Page height:</label>
95 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
98 <label for="page_width">Page width:</label>
99 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
102 <label for="card_height">Card height:</label>
103 <input type="text" size="4" name="card_height" id="card_height" value="[% card_height | html %]" />
106 <label for="card_width">Card width:</label>
107 <input type="text" size="4" name="card_width" id="card_width" value="[% card_width | html %]" />
114 <div class="col-sm-6">
115 <fieldset class="rows">
117 <label for="top_margin">Top page margin:</label>
118 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
121 <label for="left_margin">Left page margin:</label>
122 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
125 <label for="cols">Number of columns:</label>
126 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
129 <label for="rows">Number of rows:</label>
130 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
133 <label for="col_gap">Gap between columns:</label>
134 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
137 <label for="row_gap">Gap between rows:</label>
138 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
142 <label for="profile_id">Profile:</label>
143 [% IF ( profile_list ) %]
144 <select id="profile_id" name="profile_id">
145 [% FOREACH profile_lis IN profile_list %]
146 [% IF ( profile_lis.selected ) %]
147 <option value="[% profile_lis.profile_id | html %]" selected="selected">
149 <option value="[% profile_lis.profile_id | html %]">
151 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
156 <a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Define a printer profile.</a>
164 <fieldset class="action">
165 <input type="submit" class="btn btn-primary" value="Save" />
166 <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a>
167 <input type="hidden" name="op" value="save" />
168 [% IF ( template_id ) %]
169 <input type="hidden" name="template_id" value="[% template_id | html %]" />
175 </div> <!-- /.col-sm-10.col-sm-push-2 -->
177 <div class="col-sm-2 col-sm-pull-10">
179 [% INCLUDE 'tools-menu.inc' %]
181 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
182 </div> <!-- /.row -->
184 [% MACRO jsinclude BLOCK %]
185 [% Asset.js("js/tools-menu.js") | $raw %]
187 $(document).ready(function(){
188 var selectedUnit = $("#units option:selected").val();
189 var unitfields = $("#page_height,#page_width,#card_width,#card_height,#top_margin,#left_margin,#col_gap,#row_gap");
190 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
191 $("#units").change(function(){
192 $(".unit").html(getUnit($(this).val()));
194 function getUnit(unit){
220 [% INCLUDE 'intranet-bottom.inc' %]