'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' },
}
}
+ 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>