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): %s?").format(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 %s.").format(op));
38 $(document).ready(function() {
39 $("#delete").click(function(){
40 return DeleteConfirm();
46 <body id="pcard_image-manage" class="tools pcard">
47 [% INCLUDE 'header.inc' %]
48 [% INCLUDE 'cat-search.inc' %]
49 <div id="breadcrumbs">
50 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
51 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
52 <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> ›
55 <div id="doc3" class="yui-t2">
59 [% INCLUDE 'patroncards-errors.inc' %]
61 <div class="yui-u first">
62 <h1>Upload Images</h1>
63 [% IF ( IMPORT_SUCCESSFUL ) %]
64 <div id="dialog" class="dialog message">
65 <h3>Image successfully uploaded</h3>
66 <ul><li>File: [% SOURCE_FILE %]</li>
67 <li>Image name: [% IMAGE_NAME %]</li></ul>
70 <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
71 <fieldset class="brief">
73 <b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported. Images <b>must</b> be less than 500KB.
77 <label for="uploadfile">Select the file to upload: </label>
78 <input type="file" id="uploadfile" name="uploadfile" />
79 <input type="hidden" id="image" name="filetype" value="image" />
82 <label for="image_name">Image name: </label>
84 This will be the name by which you will refer to this image in the patron card layout editor.
86 <input type="text" id="image_name" name="image_name" size="20" />
90 <fieldset class="action">
91 <input type="hidden" name="op" value="upload" />
92 <input id="uploadsu" type="submit" value="Upload" />
93 <a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
98 <h1>Delete Images</h1>
99 [% IF ( DELETE_SUCCESSFULL ) %]
100 <div id="dialog" class="dialog message">
101 <h3>Image(s) successfully deleted</h3>
105 <form name="delete_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
106 <fieldset class="brief">
108 Select one or more images to delete.
111 [% FOREACH TABL IN TABLE %]
112 [% IF ( TABL.header_fields ) %]
114 [% FOREACH header_field IN TABL.header_fields %]
115 <th>[% header_field.field_label %]</th>
120 [% FOREACH text_field IN TABL.text_fields %]
121 [% IF ( text_field.select_field ) %]
122 <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
123 [% ELSIF ( text_field.field_value ) %]
124 <td>[% text_field.field_value %]</td>
134 <fieldset class="action">
135 <input type="hidden" name="op" value="delete" />
136 <input type="button" id="delete" value="Delete" />
137 <a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
141 <fieldset class="brief">
143 No images are currently available.
151 <div class="yui-b noprint">
152 [% INCLUDE 'patroncards-menu.inc' %]
155 [% INCLUDE 'intranet-bottom.inc' %]