Koha/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.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

201 lines
9.7 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Patron Card Creator &rsaquo; Manage Images</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript">
//<![CDATA[
function DeleteConfirm() {
var results = selected_images("delete");
if (results.images != -1) {
var msg = "Are you sure you want to delete image(s): " + results.image_ids + "?";
var answer = confirm(msg);
if (answer) {
window.location = "/cgi-bin/koha/patroncards/image-manage.pl?op=delete&" + results.images;
}
else {
return; // abort delete
}
}
};
function selected_images(op) {
var selected = new Array;
var image_ids = new Array;
if (document.delete_images.action.length) {
for (i=0;i<document.delete_images.action.length;i++){
if (document.delete_images.action[i].checked){
selected.push("image_id=" + document.delete_images.action[i].value);
image_ids.push(document.delete_images.action[i].value);
}
};
images = selected.join("&");
return {images:images, image_ids:image_ids};
}
else if (document.delete_images.action.checked){
return {images:"batch_id="+document.delete_images.action.value, image_ids:document.delete_images.action.value};
};
alert("Please select image(s) to " + op + ".");
return (-1);
};
function showHideLayers(element, time, action) {
setTimeout("changeVisibility('" + element + "','" + action + "')", time)
}
function changeVisibility(element, action) {
document.getElementById(element).style.display=action;
}
</script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#upload_cancel").empty();
$("#delete_cancel").empty();
$("#upload").empty();
$("#delete").empty();
buildButtons();
showHideLayers('dialog', 5000, 'none')
});
function buildButtons() {
new YAHOO.widget.Button({
type: "link",
label: _("Cancel"),
id: "cancelul",
href: "/cgi-bin/koha/patroncards/home.pl",
container: "upload_cancel"
});
new YAHOO.widget.Button({
type: "link",
label: _("Cancel"),
id: "canceldel",
href: "/cgi-bin/koha/patroncards/home.pl",
container: "delete_cancel"
});
new YAHOO.widget.Button({
type: "submit",
label: _("Upload"),
id: "uploadsb",
value: "upload",
container: "upload"
});
var deleteButton = new YAHOO.widget.Button({
type: "link",
onclick: {fn: DeleteConfirm},
label: _("Delete"),
id: "deletesb",
value: "delete",
container: "delete",
});
}
</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;
Manage Images
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="error-messages.inc" -->
<div class="yui-g">
<div class="yui-u first">
<h1>Upload Images</h1>
<!-- TMPL_IF name="IMPORT_SUCCESSFUL" -->
<div id="dialog" class="dialog message">
<li><h3>Image successfully uploaded.</h3></li>
<li>File: <!-- TMPL_VAR name="SOURCE_FILE" --></li>
<li>Image name: <!-- TMPL_VAR name="IMAGE_NAME" --></li>
</div>
<!-- /TMPL_IF -->
<form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
<fieldset class="brief">
<div class="hint">
<b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported. Images <b>must</b> be less than 500KB.
</div>
<li>
<label for="uploadfile">Select the file to upload: </label>
<input type="file" id="uploadfile" name="uploadfile" />
<input type="hidden" id="image" name="filetype" value="image" />
</li>
<li>
<label for="image_name">Image name: </label>
<div class="hint">
This will be the name by which you will refer to this image in the patron card layout editor.
</div>
<input type="text" id="image_name" name="image_name" size="20" />
</li>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="upload" />
<span id="upload"><input id="uploadsu" type="submit" value="upload" class="submit" /></span>
<span id="upload_cancel"><a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span>
</fieldset>
</form>
</div>
<div class="yui-u">
<h1>Delete Images</h1>
<!-- TMPL_IF name="DELETE_SUCCESSFULL" -->
<div id="dialog" class="dialog message">
<li><h3>Image(s) successfully deleted.</h3></li>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="TABLE" -->
<form name="delete_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
<fieldset class="brief">
<div class="hint">
Select one or more images to delete.
</div>
<li>
<table>
<!-- TMPL_LOOP NAME="TABLE" -->
<!-- TMPL_IF NAME="header_fields" -->
<tr>
<!-- TMPL_LOOP NAME="header_fields" -->
<th><!-- TMPL_VAR NAME="field_label" --></th>
<!-- /TMPL_LOOP -->
</tr>
<!-- TMPL_ELSE -->
<tr>
<!-- TMPL_LOOP NAME="text_fields" -->
<!-- TMPL_IF NAME="select_field" -->
<td align="center"><input type="checkbox" name="action" value="<!-- TMPL_VAR NAME="field_value" -->" /></td>
<!-- TMPL_ELSIF NAME="field_value" -->
<td><!-- TMPL_VAR NAME="field_value" --></td>
<!-- TMPL_ELSE -->
<td>&nbsp;</td>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</tr>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</table>
</li>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="delete" />
<span id="delete"><input id="deletesu" type="button" id="delete" onclick="DeleteConfirm()" value="Delete Image(s)" /></span>
<span id="delete_cancel"><a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span>
</fieldset>
</form>
<!-- TMPL_ELSE -->
<fieldset class="brief">
<div class="hint">
No images are currently available.
</div>
</fieldset>
<!-- /TMPL_IF -->
</div>
</div>
</div>
</div>
<div class="yui-b noprint">
<!-- TMPL_INCLUDE NAME="patroncards-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->