Add a speedbump (confirmation dialog) when deleting authority records
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Aug 2010 03:35:59 +0000 (03:35 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Aug 2010 03:35:59 +0000 (03:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17276 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/cat/authority/list.js

index 5cffc9e..367c099 100644 (file)
@@ -73,6 +73,12 @@ function displayAuthorities(data) {
         // "Delete" menu item
         new dijit.MenuItem({"id": "delete_" + authId, "onClick":function(){
             recId = this.id.slice(this.id.lastIndexOf('_') + 1);
+
+            // Deleting an authority record is unusual; let's be 100% sure
+            if (!confirm("Are you sure you want to delete record " + recId + "?")) {
+                return;
+            }
+
             pcrud = new openils.PermaCrud();
             auth_rec = pcrud.retrieve("are", recId);
             if (auth_rec) {