3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Upload patron images</title>
5 [% INCLUDE 'doc-head-close.inc' %]
8 <body id="tools_picture-upload" class="tools">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'patron-search.inc' %]
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( TOTAL ) %]<a href="/cgi-bin/koha/tools/picture-upload.pl">Upload patron images</a> › Results[% ELSE %]Upload patron images[% END %] </div>
15 <div id="doc3" class="yui-t2">
22 <div class="dialog alert">
23 <h3>Patron image(s) uploaded with some errors</h3>
26 <div class="dialog alert">
27 <h3>Patron image failed to upload</h3>
31 <div class="dialog message">
32 <h3>Patron image(s) successfully uploaded</h3>
36 <li>Unpacking completed</li>
37 <li>[% TOTAL %] directories scanned.</li>
38 <li>[% HANDLED %] directories processed.</li>
41 [% FOREACH COUNT IN COUNTS %]
42 <div class="container">
44 <caption>Results</caption>
46 <tr><th>File name</th><th>Card number</th><th>Result</th></tr>
49 [% IF ( COUNT.TCOUNTS ) %]<li>[% COUNT.TCOUNTS %] image(s) moved into the database:</li>[% END %]
50 [% FOREACH filename IN COUNT.filenames %]
52 <td>[% filename.source | html %]</td>
53 <td><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% filename.cardnumber | url %]">[% filename.cardnumber | html %]</a></td>
55 [% IF ( filename.filerrors ) %]
56 [% FOREACH filerror IN filename.filerrors %]
57 [% IF ( filerror.DBERR ) %]<b>ERROR:</b> Image not imported because the database returned an error. Please refer to the error log for more details.
58 [% ELSIF ( filerror.IMGEXISTS ) %]<b>ERROR:</b> Image not imported because this patron does not exist in the database.
59 [% ELSIF ( filerror.MIMERR ) %]<b>ERROR:</b> Image not imported because the image format is unrecognized.
60 [% ELSIF ( filerror.CORERR ) %]<b>ERROR:</b> Image not imported because the image file is corrupted.
61 [% ELSIF ( filerror.OPNERR ) %]<b>ERROR:</b> Image not imported because Koha was unable to open the image for reading.
62 [% ELSIF ( filerror.OVRSIZ ) %]<b>ERROR:</b> Image not imported because the image file is too big (see online help for maximum size).
63 [% ELSIF ( filerror.CRDFIL ) %]<b>ERROR:</b> Image not imported ([% filerror.CRDFIL %] missing).
64 [% ELSIF ( filerror.CARDNUMBER_DOES_NOT_EXIST ) %]<b>ERROR:</b> Image not imported because this patron does not exist in the database.
65 [% ELSE %]<b>ERROR:</b> Image not imported because of an unknown error. Please refer to the error log for more details.
68 [% ELSE %] imported successfully.
77 [% IF ( borrowernumber ) %]
78 <li><a id="member" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Return to patron detail</a></li>
80 <li><a id="uploadmore" href="/cgi-bin/koha/tools/picture-upload.pl">Upload more images</a></li>
81 <li><a id="doneupload" href="/cgi-bin/koha/tools/tools-home.pl">Return to tools</a></li>
86 <h1>Upload patron images</h1>
88 <div class="dialog alert">
89 [% FOREACH ERROR IN ERRORS %]
90 [% IF ( ERROR.NOTZIP ) %]<li><b>The upload file does not appear to be a zip file. The extension is not '.zip'.</b></li>
91 [% ELSIF ( ERROR.NOWRITETEMP ) %]<li><b>This script is not able to create/write to the necessary temporary directory.</b></li>
92 [% ELSIF ( ERROR.EMPTYUPLOAD ) %]<li><b>The upload file appears to be empty.</b></li>
93 [% ELSIF ( ERROR.OPNLINK ) %]<li><b>Cannot open [% ERROR.OPNLINK %] to read.<br />Please verify that it exists.</b></li>
94 [% ELSIF ( ERROR.OPNIMG ) %]<li><b>Cannot open [% ERROR.OPNIMG %] to read.<br />Please verify that it exists.</b></li>
95 [% ELSIF ( ERROR.DELERR ) %]<li><b>Unrecognized or missing field delimiter.<br />Please verify that you are using either a single quote or a tab.</b></li>
96 [% ELSIF ( ERROR.UZIPFAIL ) %]<li><b>[% ERROR.UZIPFAIL %] failed to unpack.<br />Please verify the integrity of the ZIP file and retry.</b></li>
97 [% ELSE %]<li><b>[% ERROR.CORERR %] An unknown error has occurred.<br />Please review the error log for more details.</b></li>[% END %]
101 <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data" id="upload_form">
102 <fieldset class="rows">
103 <p><b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported.</p>
106 <label for="zipfile"><input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> Zip file</label></li>
109 [% IF ( filetype == 'image' ) %]<input type="radio" id="image" name="filetype" value="image" checked="checked" />[% ELSE %]<input type="radio" id="image" name="filetype" value="image" />[% END %] Image file</label>
111 [% IF ( filetype == 'image' ) %]
114 <li id="cardnum" style="display: none">
116 <label for="cardnumber">Enter patron cardnumber: </label>
117 <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber %]" size="15" />
118 <span class="required">Required</span>
120 <li class="required">
121 <label for="uploadfile">Select the file to upload: </label>
122 <input type="file" id="uploadfile" name="uploadfile" class="required" required="required" />
123 <span class="required">Required</span>
127 <fieldset class="action">
128 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
129 <input type="hidden" name="op" value="Upload" />
130 <input type="submit" value="Upload" class="submit" />
131 <a href="/cgi-bin/koha/tools/tools-home.pl" class="cancel">Cancel</a>
138 <div class="yui-b noprint">
139 [% INCLUDE 'tools-menu.inc' %]
143 [% MACRO jsinclude BLOCK %]
144 [% Asset.js("js/tools-menu.js") %]
145 [% Asset.js("js/members-menu.js") %]
146 <script type="text/javascript">
147 $(document).ready(function() {
148 $("#zipfile").click(function(){
149 $("#cardnum").hide();
151 $("#image").click(function(){
152 $("#cardnum").show();
154 $( "#upload_form" ).validate({
158 depends: function(element) {
159 return $("#image").is(":checked");
169 [% INCLUDE 'intranet-bottom.inc' %]