From 60714ff138d1344d1999f7476c8a1d65103e0f09 Mon Sep 17 00:00:00 2001 From: dbs Date: Fri, 20 Aug 2010 03:47:46 +0000 Subject: [PATCH] Add a speedbump to the MFHD delete workflow git-svn-id: svn://svn.open-ils.org/ILS/trunk@17277 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/opac/nls/opac.js | 1 + Open-ILS/web/opac/skin/default/js/rdetail.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Open-ILS/web/js/dojo/openils/opac/nls/opac.js b/Open-ILS/web/js/dojo/openils/opac/nls/opac.js index 7d515bf57..84784982d 100644 --- a/Open-ILS/web/js/dojo/openils/opac/nls/opac.js +++ b/Open-ILS/web/js/dojo/openils/opac/nls/opac.js @@ -14,6 +14,7 @@ "CREATE_MFHD": "Add MFHD Record", "CREATED_MFHD_RECORD": "Created MFHD record for ${0}", "DELETE_MFHD": "Delete Record", + "DELETE_MFHD_CONFIRM": "Are you sure you want to delete this serial record?", "DELETED_MFHD_RECORD": "Deleted MFHD record ${0}", "EDIT_MFHD_RECORD": "Edit Record", "EDIT_MFHD_MENU": "Edit Holdings", diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js index 03157aa12..1221a26f8 100644 --- a/Open-ILS/web/opac/skin/default/js/rdetail.js +++ b/Open-ILS/web/opac/skin/default/js/rdetail.js @@ -353,6 +353,10 @@ function _holdingsDrawMFHD(holdings, entryNum) { var mfhd_edit = new dijit.Menu({}); new dijit.MenuItem({onClick: function(){loadMarcEditor(holdings.sre_id())}, label:opac_strings.EDIT_MFHD_RECORD}).placeAt(mfhd_edit, "first"); new dijit.MenuItem({onClick:function(){ + // Avoid accidental deletion of MFHD records + if (!confirm(opac_strings.DELETE_MFHD_CONFIRM)) { + return; + } var pcrud = new openils.PermaCrud({"authtoken": G.user.session}); var mfhd_rec = pcrud.retrieve("sre", holdings.sre_id()); if (mfhd_rec) { -- 2.11.0