From: dbs Date: Fri, 20 Aug 2010 03:47:46 +0000 (+0000) Subject: Add a speedbump to the MFHD delete workflow X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=60714ff138d1344d1999f7476c8a1d65103e0f09;p=contrib%2FConifer.git Add a speedbump to the MFHD delete workflow git-svn-id: svn://svn.open-ils.org/ILS/trunk@17277 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 7d515bf57e..84784982df 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 03157aa128..1221a26f8a 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) {