Adding javascript confirm to patron image replace and delete. Also adding check for empty file upload form field.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
395a3499a6
commit
fb68be3a48
|
|
@ -6,6 +6,17 @@
|
|||
//<![CDATA[
|
||||
$(document).ready(function() {
|
||||
$('#finesholdsissues > ul').tabs();
|
||||
$('#manage-patron-image').find("input[@value*=Delete]").click(function(){
|
||||
return confirm('Are you sure you want to delete this patron image? This cannot be undone.');
|
||||
});<!-- TMPL_IF NAME="picture" -->
|
||||
$('#manage-patron-image').find("input[@value*=Upload]").click(function(){
|
||||
if($("#uploadfile").val() == ""){
|
||||
alert("Please choose a file to upload");
|
||||
return false;
|
||||
} else {
|
||||
return confirm('Are you sure you want to replace the current patron image? This cannot be undone.');
|
||||
}
|
||||
});<!-- /TMPL_IF -->
|
||||
});
|
||||
function uncheck_sibling(me){
|
||||
nodename=me.getAttribute("name");
|
||||
|
|
@ -194,7 +205,7 @@ for (var i=0;i<ItemsNodes.length;i++){
|
|||
|
||||
<!-- Begin Upload Patron Image Section -->
|
||||
|
||||
<div>
|
||||
<div id="manage-patron-image">
|
||||
<!-- TMPL_IF NAME="patronimages" -->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools" -->
|
||||
<form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">
|
||||
|
|
|
|||
Loading…
Reference in New Issue