4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Tools › Upload patron images</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="tools_picture-upload" class="tools">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'patron-search.inc' %]
14 <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>
16 [% INCLUDE 'blocking_errors.inc' %]
17 <div class="main container-fluid">
19 <div class="col-sm-10 col-sm-push-2">
25 <div class="dialog alert">
26 <h3>Patron image(s) uploaded with some errors</h3>
29 <div class="dialog alert">
30 <h3>Patron image failed to upload</h3>
34 <div class="dialog message">
35 <h3>Patron image(s) successfully uploaded</h3>
39 <li>Unpacking completed</li>
40 <li>[% TOTAL | html %] directories scanned.</li>
41 <li>[% HANDLED | html %] directories processed.</li>
44 [% FOREACH COUNT IN COUNTS %]
45 <div class="container">
47 <caption>Results</caption>
49 <tr><th>File name</th><th>Card number</th><th>Result</th></tr>
52 [% IF ( COUNT.TCOUNTS ) %]<li>[% COUNT.TCOUNTS | html %] image(s) moved into the database:</li>[% END %]
53 [% FOREACH filename IN COUNT.filenames %]
55 <td>[% filename.source | html %]</td>
56 <td><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% filename.cardnumber | url %]">[% filename.cardnumber | html %]</a></td>
58 [% IF ( filename.filerrors ) %]
59 [% FOREACH filerror IN filename.filerrors %]
60 [% IF ( filerror.DBERR ) %]<strong>ERROR:</strong> Image not imported because the database returned an error. Please refer to the error log for more details.
61 [% ELSIF ( filerror.IMGEXISTS ) %]<strong>ERROR:</strong> Image not imported because this patron does not exist in the database.
62 [% ELSIF ( filerror.MIMERR ) %]<strong>ERROR:</strong> Image not imported because the image format is unrecognized.
63 [% ELSIF ( filerror.CORERR ) %]<strong>ERROR:</strong> Image not imported because the image file is corrupted.
64 [% ELSIF ( filerror.OPNERR ) %]<strong>ERROR:</strong> Image not imported because Koha was unable to open the image for reading.
65 [% ELSIF ( filerror.OVRSIZ ) %]<strong>ERROR:</strong> Image not imported because the image file is too big (see online help for maximum size).
66 [% ELSIF ( filerror.CRDFIL ) %]<strong>ERROR:</strong> Image not imported ([% filerror.CRDFIL | html %] missing).
67 [% ELSIF ( filerror.CARDNUMBER_DOES_NOT_EXIST ) %]<strong>ERROR:</strong> Image not imported because this patron does not exist in the database.
68 [% ELSE %]<strong>ERROR:</strong> Image not imported because of an unknown error. Please refer to the error log for more details.
71 [% ELSE %] imported successfully.
80 [% IF ( borrowernumber ) %]
81 <li><a id="member" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">Return to patron detail</a></li>
83 <li><a id="uploadmore" href="/cgi-bin/koha/tools/picture-upload.pl">Upload more images</a></li>
84 <li><a id="doneupload" href="/cgi-bin/koha/tools/tools-home.pl">Return to tools</a></li>
87 <h1>Upload patron images</h1>
89 <div class="dialog alert">
90 [% FOREACH ERROR IN ERRORS %]
91 [% IF ( ERROR.NOTZIP ) %]<li><strong>The upload file does not appear to be a zip file. The extension is not '.zip'.</strong></li>
92 [% ELSIF ( ERROR.NOWRITETEMP ) %]<li><strong>This script is not able to create/write to the necessary temporary directory.</strong></li>
93 [% ELSIF ( ERROR.EMPTYUPLOAD ) %]<li><strong>The upload file appears to be empty.</strong></li>
94 [% ELSIF ( ERROR.OPNLINK ) %]<li><strong>Cannot open [% ERROR.OPNLINK | html %] to read.<br />Please verify that it exists.</strong></li>
95 [% ELSIF ( ERROR.OPNIMG ) %]<li><strong>Cannot open [% ERROR.OPNIMG | html %] to read.<br />Please verify that it exists.</strong></li>
96 [% ELSIF ( ERROR.DELERR ) %]<li><strong>Unrecognized or missing field delimiter.<br />Please verify that you are using either a single quote or a tab.</strong></li>
97 [% ELSIF ( ERROR.UZIPFAIL ) %]<li><strong>[% ERROR.UZIPFAIL | html %] failed to unpack.<br />Please verify the integrity of the ZIP file and retry.</strong></li>
98 [% ELSE %]<li><strong>[% ERROR.CORERR | html %] An unknown error has occurred.<br />Please review the error log for more details.</strong></li>[% END %]
102 <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data" id="upload_form">
103 <fieldset class="rows">
104 <p><strong>NOTE:</strong> Only PNG, GIF, JPEG, XPM formats are supported.</p>
107 <label for="zipfile"><input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> Zip file</label></li>
110 [% 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>
112 [% IF ( filetype == 'image' ) %]
115 <li id="cardnum" style="display: none">
117 <label for="cardnumber">Enter patron cardnumber: </label>
118 <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" size="15" />
119 <span class="required">Required</span>
121 <li class="required">
122 <label for="uploadfile">Select the file to upload: </label>
123 <input type="file" id="uploadfile" name="uploadfile" class="required" required="required" />
124 <span class="required">Required</span>
128 <fieldset class="action">
129 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
130 <input type="hidden" name="op" value="Upload" />
131 <input type="submit" value="Upload" class="submit" />
132 <a href="/cgi-bin/koha/tools/tools-home.pl" class="cancel">Cancel</a>
138 </div> <!-- /.col-sm-10.col-sm-push-2 -->
140 <div class="col-sm-2 col-sm-pull-10">
142 [% INCLUDE 'tools-menu.inc' %]
144 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
145 </div> <!-- /.row -->
147 [% MACRO jsinclude BLOCK %]
148 [% Asset.js("js/tools-menu.js") | $raw %]
149 [% INCLUDE 'str/members-menu.inc' %]
150 [% Asset.js("js/members-menu.js") | $raw %]
152 $(document).ready(function() {
153 $("#zipfile").click(function(){
154 $("#cardnum").hide();
156 $("#image").click(function(){
157 $("#cardnum").show();
159 $( "#upload_form" ).validate({
163 depends: function(element) {
164 return $("#image").is(":checked");
174 [% INCLUDE 'intranet-bottom.inc' %]