1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Tools › Patron Cards</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/JavaScript" language="JavaScript">
6 $(document).ready(function() {
7 var selectedUnit = $("#units option:selected").attr("value");
8 var unitfields = $("#font_size,#field_1_llx,#field_1_lly,#field_2_llx,#field_2_lly,#field_3_llx,#field_3_lly,#barcode_Tx,#barcode_Ty,#image_1_Dx,#image_1_Tx,#image_1_Ty,#image_2_Dx,#image_2_Tx,#image_2_Ty");
9 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
10 $("#units").change(function(){
11 $(".unit").html(getUnit($(this).val()));
13 Go($("#image_1_image_source").val(), 'image_1_image_name');
14 Go($("#image_1_image_source").val(), 'image_1_image_metrics');
15 $("#image_1_image_source").change(function(){
16 $(".image_1_image_source").html(Go($(this).val(), 'image_1_image_name'));
17 $(".image_1_image_source").html(Go($(this).val(), 'image_1_image_metrics'));
19 Go($("#image_2_image_source").val(), 'image_2_image_name');
20 Go($("#image_2_image_source").val(), 'image_2_image_metrics');
21 $("#image_2_image_source").change(function(){
22 $(".image_2_image_source").html(Go($(this).val(), 'image_2_image_name'));
23 $(".image_2_image_source").html(Go($(this).val(), 'image_2_image_metrics'));
25 var selectFieldNames = ["field_1","field_2","field_3"];
26 for (var i=0; i < selectFieldNames.length; i++) {
27 Go($("#"+selectFieldNames[i]+"_enable").attr("checked"), selectFieldNames[i]+"_select");
29 $("#field_1_enable").change(function(){
30 $(".field_1_enable").html(Go($(this).attr("checked"), 'field_1_select'));
32 $("#field_2_enable").change(function(){
33 $(".field_2_enable").html(Go($(this).attr("checked"), 'field_2_select'));
35 $("#field_3_enable").change(function(){
36 $(".field_3_enable").html(Go($(this).attr("checked"), 'field_3_select'));
38 $("#barcode_print").load(barcode_text('barcode_param'));
39 $("#barcode_print").change(function(){
40 barcode_text('barcode_param');
42 function barcode_text(division) {
43 var eBarcode = document.getElementById(division);
44 if( $("input[name=barcode_print]:checked").attr("checked") ) {
45 eBarcode.style.display = 'block';
47 eBarcode.style.display = 'none';
48 $('input[name=barcode_text_print]').attr('checked', false);
51 function getUnit(unit){
73 function Go(oSelect, oElement){
74 var element = document.getElementById(oElement);
76 case /^.*_name/.test(oElement):
77 if ((oSelect == 'patronimages') || (oSelect == 'none')) {
78 element.style.display = 'none';
81 element.style.display = 'block';
84 case /^.*_metrics/.test(oElement):
85 if ((oSelect == 'none') || (oSelect == '')) {
86 element.style.display = 'none';
89 element.style.display = 'block';
92 case /^.*_select/.test(oElement):
94 element.style.display = 'none';
97 element.style.display = 'block';
108 <script type="text/javascript">
110 $(document).ready(function() {
112 $("#cancel").empty();
115 function submitForm() {
116 document.input.submit();
118 function buildButtons() {
119 var saveButton = new YAHOO.widget.Button({
121 onclick: {fn: submitForm},
126 var cancelButton = new YAHOO.widget.Button({
128 href: "/cgi-bin/koha/patroncards/manage.pl?card_element=layout",
137 <!-- TMPL_INCLUDE NAME="header.inc" -->
138 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
139 <div id="breadcrumbs">
140 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
141 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
142 <a href="/cgi-bin/koha/patroncards/home.pl">Patroncards Home</a> ›
143 <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Mange Patroncard Layouts</a> ›
144 <!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Patroncard Layout
146 <div id="doc3" class="yui-t2">
150 <!-- NOTE: The order of the elements on this form is crictical to correct processing. You've been warned... -->
151 <form name="input" action="/cgi-bin/koha/patroncards/edit-layout.pl" method="get">
153 <div class="yui-g first">
154 <fieldset class="rows">
155 <legend><!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Patroncard Text Layout</legend>
159 <legend>General Settings</legend>
161 <label for="layout_name">Layout Name</label>
162 <input type="text" name="layout_name" id="layout_name" size="20" value="<!-- TMPL_VAR NAME="layout_name" -->" />
165 <label for="units">Units:</label>
166 <select id="units" name="units">
167 <!-- TMPL_LOOP NAME="units" -->
168 <!-- TMPL_IF NAME="selected" -->
169 <option value="<!-- TMPL_VAR NAME="type" -->" selected="selected">
171 <option value="<!-- TMPL_VAR NAME="type" -->">
173 <!-- TMPL_VAR NAME="desc" -->
179 <label for="page_side">Page Side:</label>
180 <!-- TMPL_IF NAME="page_side" -->
181 <input type="radio" name="page_side" id="page_side" value="F" />Front
182 <input type="radio" name="page_side" id="page_side" value="B" checked />Back
184 <input type="radio" name="page_side" id="page_side" value="F" checked />Front
185 <input type="radio" name="page_side" id="page_side" value="B" />Back
193 <legend>Text Fields</legend>
196 <!-- TMPL_IF NAME="field_1"-->
197 <legend><input type="checkbox" name="field_1_enable" id="field_1_enable" value="1" checked="checked" /> Field 1</legend>
199 <legend><input type="checkbox" name="field_1_enable" id="field_1_enable" value="1" /> Field 1</legend>
201 <div id="field_1_select" style="display: none;">
203 <label for="field_1_text">Text</label>
204 <input type="text" name="field_1_text" id="field_1_text" size="60" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_1_text" -->" />
207 <label for="field_1_font">Font</label>
208 <select name="field_1_font" id="field_1_font">
209 <!-- TMPL_LOOP Name="field_1_font" -->
210 <!-- TMPL_IF Name="selected" -->
211 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
213 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
219 <label for="field_1_font_size">Font Size</label>
220 <input type="text" name="field_1_font_size" id="field_1_font_size" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_1_font_size" -->" />
221 <span class="font_unit"> pt</span>
224 <label for="field_1_text_alignment">Text Alignment</label>
225 <select name="field_1_text_alignment" id="field_1_text_alignment">
226 <!-- TMPL_LOOP Name="field_1_text_alignment" -->
227 <!-- TMPL_IF Name="selected" -->
228 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
230 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
236 <label for="field_1_llx">Lower Left X Coordinate</label>
237 <input type="text" name="field_1_llx" id="field_1_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_1_llx" -->" />
240 <label for="field_1_lly">Lower Left Y Coordinate</label>
241 <input type="text" name="field_1_lly" id="field_1_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_1_lly" -->" />
248 <!-- TMPL_IF NAME="field_2"-->
249 <legend><input type="checkbox" name="field_2_enable" id="field_2_enable" value="1" checked="checked"/> Field 2</legend>
251 <legend><input type="checkbox" name="field_2_enable" id="field_2_enable" value="1" /> Field 2</legend>
253 <div id="field_2_select" style="display: none;">
255 <label for="field_2_text">Text</label>
256 <input type="text" name="field_2_text" id="field_2_text" size="60" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_2_text" -->" />
259 <label for="field_2_font">Font</label>
260 <select name="field_2_font" id="field_2_font">
261 <!-- TMPL_LOOP Name="field_2_font" -->
262 <!-- TMPL_IF Name="selected" -->
263 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
265 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
271 <label for="field_2_font_size">Font Size</label>
272 <input type="text" name="field_2_font_size" id="field_2_font_size" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_2_font_size" -->" />
273 <span class="font_unit"> pt</span>
276 <label for="field_2_text_alignment">Text Alignment</label>
277 <select name="field_2_text_alignment" id="field_2_text_alignment">
278 <!-- TMPL_LOOP Name="field_2_text_alignment" -->
279 <!-- TMPL_IF Name="selected" -->
280 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
282 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
288 <label for="field_2_llx">Lower Left X Coordinate</label>
289 <input type="text" name="field_2_llx" id="field_2_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_2_llx" -->" />
292 <label for="field_2_lly">Lower Left Y Coordinate</label>
293 <input type="text" name="field_2_lly" id="field_2_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_2_lly" -->" />
300 <!-- TMPL_IF NAME="field_3"-->
301 <legend><input type="checkbox" name="field_3_enable" id="field_3_enable" value="1" checked="checked"/> Field 3</legend>
303 <legend><input type="checkbox" name="field_3_enable" id="field_3_enable" value="0" /> Field 3</legend>
305 <div id="field_3_select" style="display: none;">
307 <label for="field_3_text">Text</label>
308 <input type="text" name="field_3_text" id="field_3_text" size="60" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_3_text" -->" />
311 <label for="field_3_font">Font</label>
312 <select name="field_3_font" id="field_3_font">
313 <!-- TMPL_LOOP Name="field_3_font" -->
314 <!-- TMPL_IF Name="selected" -->
315 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
317 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
323 <label for="field_3_font_size">Font Size</label>
324 <input type="text" name="field_3_font_size" id="field_3_font_size" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_3_font_size" -->" />
325 <span class="font_unit"> pt</span>
328 <label for="field_3_text_alignment">Text Alignment</label>
329 <select name="field_3_text_alignment" id="field_3_text_alignment">
330 <!-- TMPL_LOOP Name="field_3_text_alignment" -->
331 <!-- TMPL_IF Name="selected" -->
332 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
334 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
340 <label for="field_3_llx">Lower Left X Coordinate</label>
341 <input type="text" name="field_3_llx" id="field_3_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_3_llx" -->" />
344 <label for="field_3_lly">Lower Left Y Coordinate</label>
345 <input type="text" name="field_3_lly" id="field_3_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_3_lly" -->" />
360 <fieldset class="rows">
361 <legend><!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Patroncard Graphic Layout</legend>
366 <label for="guidebox">Draw Guide Boxes</label>
367 <!-- TMPL_IF NAME="guidebox"-->
368 <input type="checkbox" name="guidebox" id="guidebox" value="1" checked="checked" />
370 <input type="checkbox" name="guidebox" id="guidebox" value="1" />
377 <legend>Barcode</legend>
379 <label for="barcode_print">Print Card Number as Barcode</label>
380 <!-- TMPL_IF NAME="barcode_print"-->
381 <input type="checkbox" name="barcode_print" id="barcode_print" value="1" checked="checked" />
383 <input type="checkbox" name="barcode_print" id="barcode_print" value="1" />
386 <div id="barcode_param" style="display: none;">
388 <label for="barcode_llx">Lower Left X Coordinate</label>
389 <input type="text" name="barcode_llx" id="barcode_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="barcode_llx" -->" />
392 <label for="barcode_lly">Lower Left Y Coordinate</label>
393 <input type="text" name="barcode_lly" id="barcode_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="barcode_lly" -->" />
396 <label for="barcode_type">Barcode Type</label>
397 <select name="barcode_type" id="barcode_type">
398 <!-- TMPL_LOOP Name="barcode_type" -->
399 <!-- TMPL_IF Name="selected" -->
400 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
402 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
408 <label for="barcode_text_print">Print Card Number as Text Under Barcode</label>
409 <!-- TMPL_IF NAME="barcode_text_print"-->
410 <input type="checkbox" name="barcode_text_print" id="barcode_text_print" value="1" checked="checked" />
412 <input type="checkbox" name="barcode_text_print" id="barcode_text_print" value="1" />
420 <legend>Images</legend>
423 <legend>Image 1</legend>
425 <label for="image_1_image_source">Image Source</label>
426 <select name="image_1_image_source" id="image_1_image_source">
427 <!-- TMPL_LOOP Name="image_1_image_source" -->
428 <!-- TMPL_IF Name="selected" -->
429 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
431 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
436 <div id="image_1_image_name" style="display: none;">
438 <label for="image_1_image_name">Image</label>
439 <select name="image_1_image_name" id="image_1_image_name">
440 <!-- TMPL_LOOP Name="image_1_image_name" -->
441 <!-- TMPL_IF Name="selected" -->
442 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
444 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
450 <div id="image_1_image_metrics" style="display: none;">
452 <label for="image_1_Dx">Display Height</label>
453 <input type="text" name="image_1_Dx" id="image_1_Dx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_1_Dx" -->" />
456 <label for="image_1_Tx">Lower Left X Coordinate</label>
457 <input type="text" name="image_1_Tx" id="image_1_Tx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_1_Tx" -->" />
460 <label for="image_1_Ty">Lower Left Y Coordinate</label>
461 <input type="text" name="image_1_Ty" id="image_1_Ty" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_1_Ty" -->" />
464 <!-- These pdf image parameters are currently unused, but implimented and need to default to zero -->
465 <input type="hidden" name="image_1_Ox" value="0" /><!-- Ox,Oy should be set to 0 unless you want special effects see http://www.adobe.com/devnet/pdf/pdf_reference.html ISO 32000-1 -->
466 <input type="hidden" name="image_1_Oy" value="0" />
467 <input type="hidden" name="image_1_Sx" value="0" /><!-- Sx,Sy allow scaling of the image -->
468 <input type="hidden" name="image_1_Sy" value="0" />
473 <legend>Image 2</legend>
475 <label for="image_2_image_source">Image Source</label>
476 <select name="image_2_image_source" id="image_2_image_source">
477 <!-- TMPL_LOOP Name="image_2_image_source" -->
478 <!-- TMPL_IF Name="selected" -->
479 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
481 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
486 <div id="image_2_image_name" style="display: none;">
488 <label for="image_2_image_name">Image</label>
489 <select name="image_2_image_name" id="image_2_image_name">
490 <!-- TMPL_LOOP Name="image_2_image_name" -->
491 <!-- TMPL_IF Name="selected" -->
492 <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
494 <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
500 <div id="image_2_image_metrics" style="display: none;">
502 <label for="image_2_Dx">Display Height</label>
503 <input type="text" name="image_2_Dx" id="image_2_Dx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_2_Dx" -->" />
506 <label for="image_2_Tx">Lower Left X Coordinate</label>
507 <input type="text" name="image_2_Tx" id="image_2_Tx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_2_Tx" -->" />
510 <label for="image_2_Ty">Lower Left Y Coordinate</label>
511 <input type="text" name="image_2_Ty" id="image_2_Ty" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_2_Ty" -->" />
514 <!-- These pdf image parameters are currently unused, but implimented and need to default to zero -->
515 <input type="hidden" name="image_2_Ox" value="0" /><!-- Ox,Oy should be set to 0 unless you want special effects see http://www.adobe.com/devnet/pdf/pdf_reference.html ISO 32000-1 -->
516 <input type="hidden" name="image_2_Oy" value="0" /><!-- Sx,Sy allow scaling of the image -->
517 <input type="hidden" name="image_2_Sx" value="0" />
518 <input type="hidden" name="image_2_Sy" value="0" />
527 <fieldset class="action">
528 <span id="save"><input type="submit" value="Save" /></span>
529 <span id="cancel"><a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Cancel</a></span>
530 <input type="hidden" name="op" value="save" />
531 <input type="hidden" name="layout_id" value="<!-- TMPL_VAR NAME="layout_id" -->" />
537 <!-- TMPL_INCLUDE NAME="patroncards-menu.inc" -->
540 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->