Koha/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tmpl
Nicole Engard 710a7f0086 bug 4101 patroncards changed to patron card creator
There are references to patroncards in label text through out the patron card creator - I have changed it to 'patron card creator'

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-03 15:10:05 -05:00

540 lines
36 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Patron Card Creator</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$(document).ready(function() {
var selectedUnit = $("#units option:selected").attr("value");
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");
$(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
$("#units").change(function(){
$(".unit").html(getUnit($(this).val()));
});
Go($("#image_1_image_source").val(), 'image_1_image_name');
Go($("#image_1_image_source").val(), 'image_1_image_metrics');
$("#image_1_image_source").change(function(){
$(".image_1_image_source").html(Go($(this).val(), 'image_1_image_name'));
$(".image_1_image_source").html(Go($(this).val(), 'image_1_image_metrics'));
});
Go($("#image_2_image_source").val(), 'image_2_image_name');
Go($("#image_2_image_source").val(), 'image_2_image_metrics');
$("#image_2_image_source").change(function(){
$(".image_2_image_source").html(Go($(this).val(), 'image_2_image_name'));
$(".image_2_image_source").html(Go($(this).val(), 'image_2_image_metrics'));
});
var selectFieldNames = ["field_1","field_2","field_3"];
for (var i=0; i < selectFieldNames.length; i++) {
Go($("#"+selectFieldNames[i]+"_enable").attr("checked"), selectFieldNames[i]+"_select");
}
$("#field_1_enable").change(function(){
$(".field_1_enable").html(Go($(this).attr("checked"), 'field_1_select'));
});
$("#field_2_enable").change(function(){
$(".field_2_enable").html(Go($(this).attr("checked"), 'field_2_select'));
});
$("#field_3_enable").change(function(){
$(".field_3_enable").html(Go($(this).attr("checked"), 'field_3_select'));
});
$("#barcode_print").load(barcode_text('barcode_param'));
$("#barcode_print").change(function(){
barcode_text('barcode_param');
});
function barcode_text(division) {
var eBarcode = document.getElementById(division);
if( $("input[name=barcode_print]:checked").attr("checked") ) {
eBarcode.style.display = 'block';
} else {
eBarcode.style.display = 'none';
$('input[name=barcode_text_print]').attr('checked', false);
}
}
function getUnit(unit){
switch(unit){
case "POINT":
var unit = " pt";
break;
case "AGATE":
var unit = " ag";
break;
case "INCH":
var unit = " in";
break;
case "MM":
var unit = " mm";
break;
case "CM":
var unit = " cm";
break;
default:
var unit = " pt";
}
return unit;
}
function Go(oSelect, oElement){
var element = document.getElementById(oElement);
switch(true) {
case /^.*_name/.test(oElement):
if ((oSelect == 'patronimages') || (oSelect == 'none')) {
element.style.display = 'none';
}
else {
element.style.display = 'block';
}
break;
case /^.*_metrics/.test(oElement):
if ((oSelect == 'none') || (oSelect == '')) {
element.style.display = 'none';
}
else {
element.style.display = 'block';
}
break;
case /^.*_select/.test(oElement):
if (!oSelect) {
element.style.display = 'none';
}
else {
element.style.display = 'block';
}
break;
default:
return;
}
return;
}
});
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#save").empty();
$("#cancel").empty();
buildButtons();
});
function submitForm() {
document.input.submit();
};
function buildButtons() {
var saveButton = new YAHOO.widget.Button({
type: "link",
onclick: {fn: submitForm},
label: _("Save"),
id: "save",
container: "save"
});
var cancelButton = new YAHOO.widget.Button({
type: "link",
href: "/cgi-bin/koha/patroncards/manage.pl?card_element=layout",
label: _("Cancel"),
id: "cancel",
container: "cancel",
});
};
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
<a href="/cgi-bin/koha/patroncards/home.pl">Patron Card Creator</a> &rsaquo;
<a href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Mange Patron Card Layouts</a> &rsaquo;
<!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Patron Card Layout
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- NOTE: The order of the elements on this form is crictical to correct processing. You've been warned... -->
<form name="input" action="/cgi-bin/koha/patroncards/edit-layout.pl" method="get">
<div class="yui-g">
<div class="yui-g first">
<fieldset class="rows">
<legend><!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Patron Card Text Layout</legend>
<ol>
<li>
<fieldset>
<legend>General Settings</legend>
<li>
<label for="layout_name">Layout Name</label>
<input type="text" name="layout_name" id="layout_name" size="20" value="<!-- TMPL_VAR NAME="layout_name" -->" />
</li>
<li>
<label for="units">Units:</label>
<select id="units" name="units">
<!-- TMPL_LOOP NAME="units" -->
<!-- TMPL_IF NAME="selected" -->
<option value="<!-- TMPL_VAR NAME="type" -->" selected="selected">
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="type" -->">
<!-- /TMPL_IF -->
<!-- TMPL_VAR NAME="desc" -->
</option>
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="page_side">Page Side:</label>
<!-- TMPL_IF NAME="page_side" -->
<input type="radio" name="page_side" id="page_side" value="F" />Front
<input type="radio" name="page_side" id="page_side" value="B" checked />Back
<!-- TMPL_ELSE -->
<input type="radio" name="page_side" id="page_side" value="F" checked />Front
<input type="radio" name="page_side" id="page_side" value="B" />Back
<!-- /TMPL_IF -->
</li>
</fieldset>
</li>
<li>
<fieldset>
<legend>Text Fields</legend>
<li>
<fieldset>
<!-- TMPL_IF NAME="field_1"-->
<legend><input type="checkbox" name="field_1_enable" id="field_1_enable" value="1" checked="checked" /> Field 1</legend>
<!-- TMPL_ELSE -->
<legend><input type="checkbox" name="field_1_enable" id="field_1_enable" value="1" /> Field 1</legend>
<!-- /TMPL_IF -->
<div id="field_1_select" style="display: none;">
<li>
<label for="field_1_text">Text</label>
<input type="text" name="field_1_text" id="field_1_text" size="60" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_1_text" -->" />
</li>
<li>
<label for="field_1_font">Font</label>
<select name="field_1_font" id="field_1_font">
<!-- TMPL_LOOP Name="field_1_font" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="field_1_font_size">Font Size</label>
<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" -->" />
<span class="font_unit"> pt</span>
</li>
<li>
<label for="field_1_text_alignment">Text Alignment</label>
<select name="field_1_text_alignment" id="field_1_text_alignment">
<!-- TMPL_LOOP Name="field_1_text_alignment" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="field_1_llx">Lower Left X Coordinate</label>
<input type="text" name="field_1_llx" id="field_1_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_1_llx" -->" />
</li>
<li>
<label for="field_1_lly">Lower Left Y Coordinate</label>
<input type="text" name="field_1_lly" id="field_1_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_1_lly" -->" />
</li>
</div>
</fieldset>
</li>
<li>
<fieldset>
<!-- TMPL_IF NAME="field_2"-->
<legend><input type="checkbox" name="field_2_enable" id="field_2_enable" value="1" checked="checked"/> Field 2</legend>
<!-- TMPL_ELSE -->
<legend><input type="checkbox" name="field_2_enable" id="field_2_enable" value="1" /> Field 2</legend>
<!-- /TMPL_IF -->
<div id="field_2_select" style="display: none;">
<li>
<label for="field_2_text">Text</label>
<input type="text" name="field_2_text" id="field_2_text" size="60" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_2_text" -->" />
</li>
<li>
<label for="field_2_font">Font</label>
<select name="field_2_font" id="field_2_font">
<!-- TMPL_LOOP Name="field_2_font" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="field_2_font_size">Font Size</label>
<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" -->" />
<span class="font_unit"> pt</span>
</li>
<li>
<label for="field_2_text_alignment">Text Alignment</label>
<select name="field_2_text_alignment" id="field_2_text_alignment">
<!-- TMPL_LOOP Name="field_2_text_alignment" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="field_2_llx">Lower Left X Coordinate</label>
<input type="text" name="field_2_llx" id="field_2_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_2_llx" -->" />
</li>
<li>
<label for="field_2_lly">Lower Left Y Coordinate</label>
<input type="text" name="field_2_lly" id="field_2_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_2_lly" -->" />
</li>
</div>
</fieldset>
</li>
<li>
<fieldset>
<!-- TMPL_IF NAME="field_3"-->
<legend><input type="checkbox" name="field_3_enable" id="field_3_enable" value="1" checked="checked"/> Field 3</legend>
<!-- TMPL_ELSE -->
<legend><input type="checkbox" name="field_3_enable" id="field_3_enable" value="0" /> Field 3</legend>
<!-- /TMPL_IF -->
<div id="field_3_select" style="display: none;">
<li>
<label for="field_3_text">Text</label>
<input type="text" name="field_3_text" id="field_3_text" size="60" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_3_text" -->" />
</li>
<li>
<label for="field_3_font">Font</label>
<select name="field_3_font" id="field_3_font">
<!-- TMPL_LOOP Name="field_3_font" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="field_3_font_size">Font Size</label>
<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" -->" />
<span class="font_unit"> pt</span>
</li>
<li>
<label for="field_3_text_alignment">Text Alignment</label>
<select name="field_3_text_alignment" id="field_3_text_alignment">
<!-- TMPL_LOOP Name="field_3_text_alignment" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="field_3_llx">Lower Left X Coordinate</label>
<input type="text" name="field_3_llx" id="field_3_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_3_llx" -->" />
</li>
<li>
<label for="field_3_lly">Lower Left Y Coordinate</label>
<input type="text" name="field_3_lly" id="field_3_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="field_3_lly" -->" />
</li>
</div>
</fieldset>
</li>
</fieldset>
</li>
</fieldset>
</li>
</fieldset>
</li>
</ol>
</fieldset>
</div>
<div class="yui-g">
<fieldset class="rows">
<legend><!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Patron Card Graphic Layout</legend>
<ol>
<!--
<li>
<fieldset>
<label for="guidebox">Draw Guide Boxes</label>
<!-- TMPL_IF NAME="guidebox"-->
<input type="checkbox" name="guidebox" id="guidebox" value="1" checked="checked" />
<!-- TMPL_ELSE -->
<input type="checkbox" name="guidebox" id="guidebox" value="1" />
<!-- /TMPL_IF -->
</fieldset>
</li>
-->
<li>
<fieldset>
<legend>Barcode</legend>
<li>
<label for="barcode_print">Print Card Number as Barcode</label>
<!-- TMPL_IF NAME="barcode_print"-->
<input type="checkbox" name="barcode_print" id="barcode_print" value="1" checked="checked" />
<!-- TMPL_ELSE -->
<input type="checkbox" name="barcode_print" id="barcode_print" value="1" />
<!-- /TMPL_IF -->
</li>
<div id="barcode_param" style="display: none;">
<li>
<label for="barcode_llx">Lower Left X Coordinate</label>
<input type="text" name="barcode_llx" id="barcode_llx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="barcode_llx" -->" />
</li>
<li>
<label for="barcode_lly">Lower Left Y Coordinate</label>
<input type="text" name="barcode_lly" id="barcode_lly" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="barcode_lly" -->" />
</li>
<li>
<label for="barcode_type">Barcode Type</label>
<select name="barcode_type" id="barcode_type">
<!-- TMPL_LOOP Name="barcode_type" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li>
<label for="barcode_text_print">Print Card Number as Text Under Barcode</label>
<!-- TMPL_IF NAME="barcode_text_print"-->
<input type="checkbox" name="barcode_text_print" id="barcode_text_print" value="1" checked="checked" />
<!-- TMPL_ELSE -->
<input type="checkbox" name="barcode_text_print" id="barcode_text_print" value="1" />
<!-- /TMPL_IF -->
</li>
</div>
</fieldset>
</li>
<li>
<fieldset>
<legend>Images</legend>
<li>
<fieldset>
<legend>Image 1</legend>
<li>
<label for="image_1_image_source">Image Source</label>
<select name="image_1_image_source" id="image_1_image_source">
<!-- TMPL_LOOP Name="image_1_image_source" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<div id="image_1_image_name" style="display: none;">
<li>
<label for="image_1_image_name">Image</label>
<select name="image_1_image_name" id="image_1_image_name">
<!-- TMPL_LOOP Name="image_1_image_name" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
</div>
<div id="image_1_image_metrics" style="display: none;">
<li>
<label for="image_1_Dx">Display Height</label>
<input type="text" name="image_1_Dx" id="image_1_Dx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_1_Dx" -->" />
</li>
<li>
<label for="image_1_Tx">Lower Left X Coordinate</label>
<input type="text" name="image_1_Tx" id="image_1_Tx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_1_Tx" -->" />
</li>
<li>
<label for="image_1_Ty">Lower Left Y Coordinate</label>
<input type="text" name="image_1_Ty" id="image_1_Ty" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_1_Ty" -->" />
</li>
</div>
<!-- These pdf image parameters are currently unused, but implimented and need to default to zero -->
<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 -->
<input type="hidden" name="image_1_Oy" value="0" />
<input type="hidden" name="image_1_Sx" value="0" /><!-- Sx,Sy allow scaling of the image -->
<input type="hidden" name="image_1_Sy" value="0" />
</fieldset>
</li>
<li>
<fieldset>
<legend>Image 2</legend>
<li>
<label for="image_2_image_source">Image Source</label>
<select name="image_2_image_source" id="image_2_image_source">
<!-- TMPL_LOOP Name="image_2_image_source" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<div id="image_2_image_name" style="display: none;">
<li>
<label for="image_2_image_name">Image</label>
<select name="image_2_image_name" id="image_2_image_name">
<!-- TMPL_LOOP Name="image_2_image_name" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
</div>
<div id="image_2_image_metrics" style="display: none;">
<li>
<label for="image_2_Dx">Display Height</label>
<input type="text" name="image_2_Dx" id="image_2_Dx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_2_Dx" -->" />
</li>
<li>
<label for="image_2_Tx">Lower Left X Coordinate</label>
<input type="text" name="image_2_Tx" id="image_2_Tx" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_2_Tx" -->" />
</li>
<li>
<label for="image_2_Ty">Lower Left Y Coordinate</label>
<input type="text" name="image_2_Ty" id="image_2_Ty" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="image_2_Ty" -->" />
</li>
</div>
<!-- These pdf image parameters are currently unused, but implimented and need to default to zero -->
<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 -->
<input type="hidden" name="image_2_Oy" value="0" /><!-- Sx,Sy allow scaling of the image -->
<input type="hidden" name="image_2_Sx" value="0" />
<input type="hidden" name="image_2_Sy" value="0" />
</fieldset>
</li>
</fieldset>
</li>
</ol>
</fieldset>
</div>
</div>
<fieldset class="action">
<span id="save"><input type="submit" value="Save" /></span>
<span id="cancel"><a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Cancel</a></span>
<input type="hidden" name="op" value="save" />
<input type="hidden" name="layout_id" value="<!-- TMPL_VAR NAME="layout_id" -->" />
</fieldset>
</form>
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="patroncards-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->