|
Link Here
|
| 180 |
[% END %] |
180 |
[% END %] |
| 181 |
</ul></div> |
181 |
</ul></div> |
| 182 |
|
182 |
|
|
|
183 |
[% IF patronimages && CAN_user_tools_batch_upload_patron_images %] |
| 183 |
<!-- Modal --> |
184 |
<!-- Modal --> |
| 184 |
<div class="modal" id="patronImageEdit" tabindex="-1" role="dialog" aria-labelledby="patronImageEditLabel"> |
185 |
<div class="modal" id="patronImageEdit" tabindex="-1" role="dialog" aria-labelledby="patronImageEditLabel"> |
| 185 |
<div class="modal-dialog" role="document"> |
186 |
<div class="modal-dialog" role="document"> |
|
Link Here
|
| 189 |
<h4 class="modal-title" id="patronImageEditLabel">Patron photo</h4> |
190 |
<h4 class="modal-title" id="patronImageEditLabel">Patron photo</h4> |
| 190 |
</div> |
191 |
</div> |
| 191 |
<div class="modal-body"> |
192 |
<div class="modal-body"> |
| 192 |
<img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> |
193 |
<div id="upload-patron-image" class="patroninfo-section"> |
|
|
194 |
<h5>Upload patron photo</h5> |
| 195 |
<form method="post" id="picture-upload" action="/cgi-bin/koha/tools/picture-upload.pl" |
| 196 |
enctype="multipart/form-data"> |
| 197 |
[% IF ( patron.image ) %] |
| 198 |
<div class="hint"> |
| 199 |
To update the image for [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %], select a new image file and click 'Upload.' <br />Click the 'Delete' button to |
| 200 |
remove the current image. |
| 201 |
</div> |
| 202 |
[% ELSE %] |
| 203 |
<div class="hint"> |
| 204 |
[% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %], enter the name of an image file to upload. |
| 205 |
</div> |
| 206 |
[% END %] |
| 207 |
<p>Only PNG, GIF, JPEG, XPM formats are supported.</p> |
| 208 |
<label for="uploadfile">Select the file to upload: </label> |
| 209 |
<input type="file" id="uploadfile" name="uploadfile" required="required" /> |
| 210 |
<div class="action"> |
| 211 |
<input type="hidden" id="csrf_token" name="csrf_token" value="[% csrf_token | html %]" /> |
| 212 |
<input type="hidden" id="image" name="filetype" value="image" /> |
| 213 |
<input type="hidden" id="cardnumber" name="cardnumber" value="[% patron.cardnumber | html %]" /> |
| 214 |
<input type="hidden" id="borrowernumber" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
| 215 |
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-upload"></i> Upload photo</button> |
| 216 |
<input name="op" type="hidden" value="Upload" /> |
| 217 |
[% IF ( patron.image ) %] |
| 218 |
<a id="delpicture" |
| 219 |
href="/cgi-bin/koha/tools/picture-upload.pl?op=Delete&borrowernumber=[% patron.borrowernumber | html %]&csrf_token=[% csrf_token | html %]" |
| 220 |
class="btn btn-default btn-xs delete"><i class="fa fa-trash"></i> Delete</a> |
| 221 |
[% END %] |
| 222 |
</div> |
| 223 |
</form> |
| 224 |
</div> |
| 225 |
<div id="capture-patron-image" class="patroninfo-section"> |
| 226 |
<h5>Take patron photo</h5> |
| 227 |
<form method="post" id="camera-upload" action="/cgi-bin/koha/tools/picture-upload.pl"> |
| 228 |
<div class="btn-toolbar"> |
| 229 |
<div class="btn-group"> |
| 230 |
<button class="btn btn-default" id="takebutton"><i class="fa fa-camera"></i> Take photo</button> |
| 231 |
</div> |
| 232 |
<div class="btn-group"> |
| 233 |
<button class="btn btn-default" id="retakebutton" style="display:none;"><i class="fa fa-refresh"></i> Retake photo</button> |
| 234 |
</div> |
| 235 |
<div class="btn-group"> |
| 236 |
<a id="downloadbutton" href="#" class="btn btn-default" style="display:none;"><i class="fa fa-download"></i> Download photo</a> |
| 237 |
</div> |
| 238 |
<div class="btn-group"> |
| 239 |
<button id="savebutton" type="submit" class="btn btn-default" style="display:none;"><i class="fa fa-hdd-o"></i> Upload</button> |
| 240 |
</div> |
| 241 |
</div> |
| 242 |
<div id="camera"> |
| 243 |
<video id="viewfinder">Video stream not available.</video> |
| 244 |
</div> |
| 245 |
<canvas id="canvas" style="display:none"></canvas> |
| 246 |
<div id="output" style="display:none"> |
| 247 |
<img style="width:100%;height:auto;" id="photo" alt="The screen capture will appear in this box."> |
| 248 |
</div> |
| 249 |
<input type="hidden" name="uploadfilename" value="patron-photo.jpg" /> |
| 250 |
<textarea id="uploadfiletext" name="uploadfiletext" style="display:none;"></textarea> |
| 251 |
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" /> |
| 252 |
<input type="hidden" name="filetype" value="image" /> |
| 253 |
<input type="hidden" name="cardnumber" value="[% patron.cardnumber | html %]" /> |
| 254 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
| 255 |
<input name="op" type="hidden" value="Upload" /> |
| 256 |
</form> |
| 257 |
</div> |
| 258 |
<div class="dialog message" style="display:none" id="camera-error"> |
| 259 |
<div> |
| 260 |
<span class="fa-stack fa-lg"> |
| 261 |
<i class="fa fa-camera fa-stack-1x"></i> |
| 262 |
<i class="fa fa-ban fa-stack-2x text-danger"></i> |
| 263 |
</span> |
| 264 |
</div> |
| 265 |
<div> |
| 266 |
<strong>Cannot take patron photo.</strong> |
| 267 |
<span id="camera-error-message"></span> |
| 268 |
</div> |
| 269 |
</div> |
| 193 |
</div> |
270 |
</div> |
| 194 |
<div class="modal-footer"> |
271 |
<div class="modal-footer"> |
| 195 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
272 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
|
Link Here
|
| 197 |
</div> |
274 |
</div> |
| 198 |
</div> |
275 |
</div> |
| 199 |
</div> |
276 |
</div> |
|
|
277 |
[% END %] |
| 200 |
|
278 |
|
| 201 |
[% END %] |
279 |
[% END %] |