From 0bd447774ad593d2c4ae874271c4f3e09d3ac806 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 2 Feb 2011 19:56:39 +0000 Subject: [PATCH] allow deletion of stat cat entries in the patron editor (or more accurately, rows in actor.stat_cat_entry_usr_map) by blanking out the value git-svn-id: svn://svn.open-ils.org/ILS/trunk@19364 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/actor/user/register.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index 8aa87c8244..c3070c98e4 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -1213,8 +1213,6 @@ function _uEditSave(doClone) { break; case 'statcat': - if(val == null) break; - var map = patron.stat_cat_entries().filter( function(m){ return (m.stat_cat() == w._statcat) })[0]; @@ -1222,8 +1220,15 @@ function _uEditSave(doClone) { if(map) { if(map.stat_cat_entry() == val) break; - map.ischanged(1); + if(val == null) { + val = ''; + map.isdeleted(1); + } else { + map.ischanged(1); + } } else { + if(val == null) + break; map = new fieldmapper.actscecm(); map.isnew(1); } -- 2.11.0