From fb68be3a4834685ed6c7c5bb1795fb3105d563d3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 10 Mar 2008 13:10:38 -0500 Subject: [PATCH] Adding javascript confirm to patron image replace and delete. Also adding check for empty file upload form field. Signed-off-by: Joshua Ferraro --- .../prog/en/modules/members/moremember.tmpl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl index 3a9aaf1d75..18df39fbd8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl @@ -6,6 +6,17 @@ // 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.'); + }); + $('#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.'); + } + }); }); function uncheck_sibling(me){ nodename=me.getAttribute("name"); @@ -194,7 +205,7 @@ for (var i=0;i -
+
-- 2.39.5