remove patron from usergroup
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Jun 2006 15:32:38 +0000 (15:32 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Jun 2006 15:32:38 +0000 (15:32 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4671 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/server/patron/info_group.xul

index 084c79f..fd9c0c9 100644 (file)
@@ -64,6 +64,7 @@ const api = {
        'FM_AU_RETRIEVE_VIA_BARCODE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.fleshed.retrieve_by_barcode' },
        'FM_AU_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.retrieve' },
        'FM_AU_FLESHED_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.fleshed.retrieve' },
+       'FM_AU_NEW_USERGROUP' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.usergroup.new' },
        'FM_AUN_RETRIEVE_ALL' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.note.retrieve.all' },
        'FM_AUN_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.note.create' },
        'FM_AUN_DELETE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.note.delete' },
index 8abe1d9..cf9409a 100644 (file)
                        }
                }
 
+               function remove_patron() {
+                       var c = window.confirm('Remove this patron from their existing group?');
+                       if (c) {
+                               var robj = g.network.simple_request('FM_AU_NEW_USERGROUP', [ ses(), g.patron_id, 't' ]);
+                               if (typeof robj.ilsevent != 'undefined') {
+                                       g.error.standard_unexpected_error_dialog('error removing patron from usergroup',robj);
+                               }
+                               refresh();
+                               alert('Patron removed from group.');
+                       } else {
+                               alert('Patron not removed from group.');
+                       }
+               }
+
        ]]>
        </script>