1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Patron Card Creator › Manage Images</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript">
6 function DeleteConfirm() {
7 var results = selected_images("delete");
8 if (results.images != -1) {
9 var msg = "Are you sure you want to delete image(s): " + results.image_ids + "?";
10 var answer = confirm(msg);
12 window.location = "/cgi-bin/koha/patroncards/image-manage.pl?op=delete&" + results.images;
15 return; // abort delete
19 function selected_images(op) {
20 var selected = new Array;
21 var image_ids = new Array;
22 if (document.delete_images.action.length) {
23 for (i=0;i<document.delete_images.action.length;i++){
24 if (document.delete_images.action[i].checked){
25 selected.push("image_id=" + document.delete_images.action[i].value);
26 image_ids.push(document.delete_images.action[i].value);
29 images = selected.join("&");
30 return {images:images, image_ids:image_ids};
32 else if (document.delete_images.action.checked){
33 return {images:"batch_id="+document.delete_images.action.value, image_ids:document.delete_images.action.value};
35 alert(_("Please select image(s) to ") + op + ".");
38 function showHideLayers(element, time, action) {
39 setTimeout("changeVisibility('" + element + "','" + action + "')", time)
41 function changeVisibility(element, action) {
42 document.getElementById(element).style.display=action;
45 <script type="text/javascript">
47 $(document).ready(function() {
48 $("#upload_cancel").empty();
49 $("#delete_cancel").empty();
53 showHideLayers('dialog', 5000, 'none')
56 function buildButtons() {
57 new YAHOO.widget.Button({
61 href: "/cgi-bin/koha/patroncards/home.pl",
62 container: "upload_cancel"
65 new YAHOO.widget.Button({
69 href: "/cgi-bin/koha/patroncards/home.pl",
70 container: "delete_cancel"
73 new YAHOO.widget.Button({
81 var deleteButton = new YAHOO.widget.Button({
83 onclick: {fn: DeleteConfirm},
93 [% INCLUDE 'header.inc' %]
94 [% INCLUDE 'cat-search.inc' %]
95 <div id="breadcrumbs">
96 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
97 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
98 <a href="/cgi-bin/koha/patroncards/home.pl">Patron Card Creator</a> ›
101 <div id="doc3" class="yui-t2">
105 [% INCLUDE 'error-messages.inc' %]
107 <div class="yui-u first">
108 <h1>Upload Images</h1>
109 [% IF ( IMPORT_SUCCESSFUL ) %]
110 <div id="dialog" class="dialog message">
111 <li><h3>Image successfully uploaded.</h3></li>
112 <li>File: [% SOURCE_FILE %]</li>
113 <li>Image name: [% IMAGE_NAME %]</li>
116 <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
117 <fieldset class="brief">
119 <b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported. Images <b>must</b> be less than 500KB.
122 <label for="uploadfile">Select the file to upload: </label>
123 <input type="file" id="uploadfile" name="uploadfile" />
124 <input type="hidden" id="image" name="filetype" value="image" />
127 <label for="image_name">Image name: </label>
129 This will be the name by which you will refer to this image in the patron card layout editor.
131 <input type="text" id="image_name" name="image_name" size="20" />
134 <fieldset class="action">
135 <input type="hidden" name="op" value="upload" />
136 <span id="upload"><input id="uploadsu" type="submit" value="upload" class="submit" /></span>
137 <span id="upload_cancel"><a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span>
142 <h1>Delete Images</h1>
143 [% IF ( DELETE_SUCCESSFULL ) %]
144 <div id="dialog" class="dialog message">
145 <li><h3>Image(s) successfully deleted.</h3></li>
149 <form name="delete_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
150 <fieldset class="brief">
152 Select one or more images to delete.
156 [% FOREACH TABL IN TABLE %]
157 [% IF ( TABL.header_fields ) %]
159 [% FOREACH header_field IN TABL.header_fields %]
160 <th>[% header_field.field_label %]</th>
165 [% FOREACH text_field IN TABL.text_fields %]
166 [% IF ( text_field.select_field ) %]
167 <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
168 [% ELSIF ( text_field.field_value ) %]
169 <td>[% text_field.field_value %]</td>
180 <fieldset class="action">
181 <input type="hidden" name="op" value="delete" />
182 <span id="delete"><input id="deletesu" type="button" id="delete" onclick="DeleteConfirm()" value="Delete Image(s)" /></span>
183 <span id="delete_cancel"><a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span>
187 <fieldset class="brief">
189 No images are currently available.
197 <div class="yui-b noprint">
198 [% INCLUDE 'patroncards-menu.inc' %]
201 [% INCLUDE 'intranet-bottom.inc' %]