[open-ils-commits] r13779 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/main xul/staff_client/server/locale/en-US xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jul 29 18:18:37 EDT 2009


Author: phasefx
Date: 2009-07-29 18:18:31 -0400 (Wed, 29 Jul 2009)
New Revision: 13779

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
   trunk/Open-ILS/xul/staff_client/server/patron/display.js
   trunk/Open-ILS/xul/staff_client/server/patron/display.xul
   trunk/Open-ILS/xul/staff_client/server/patron/display_horiz.xul
   trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul
   trunk/Open-ILS/xul/staff_client/server/patron/display_overlay.xul
Log:
UI for patron deletion

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-07-29 22:18:31 UTC (rev 13779)
@@ -1198,6 +1198,8 @@
 <!ENTITY staff.patron_display.verify_password.accesskey 'P'>
 <!ENTITY staff.patron_display.toggle_summary.label 'Toggle Summary'>
 <!ENTITY staff.patron_display.toggle_summary.accesskey 'T'>
+<!ENTITY staff.patron_display.delete_patron.label 'Delete Patron Account'>
+<!ENTITY staff.patron_display.delete_patron.accesskey 'D'>
 <!ENTITY staff.patron_display.mailing.city.label 'Mailing City:'>
 <!ENTITY staff.patron_display.mailing.post_code.label 'Mailing ZIP:'>
 <!ENTITY staff.patron_display.mailing.state.label 'Mailing State:'>

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-07-29 22:18:31 UTC (rev 13779)
@@ -149,6 +149,7 @@
     'FM_AU_MERGE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.merge' },
 	'FM_AU_NEW_USERGROUP' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.usergroup.new' },
 	'FM_AU_UPDATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.patron.update' },
+	'FM_AU_DELETE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.delete' },
 	'FM_AUN_RETRIEVE_ALL' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.note.retrieve.all', 'cacheable' : false, 'ttl' : 60000 },
 	'FM_AUN_RETRIEVE_ALL.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.note.retrieve.all.authoritative', 'cacheable' : false, 'ttl' : 60000 },
 	'FM_AUN_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.note.create' },

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2009-07-29 22:18:31 UTC (rev 13779)
@@ -54,7 +54,14 @@
 staff.patron.bills.void_all_billings.billings_voided=Billings voided.
 staff.patron.bill_wizard.patron_bill_finish.billing_added=Billing added.
 staff.patron.display.cmd_search_form.no_patron=No Patron Selected
-staff.patron.display.cmd_patron_edit.edit_search=Editor would like to search for: %1$s
+staff.patron.display.cmd_patron_delete.edit_search=Editor would like to search for: %1$s
+staff.patron.display.cmd_patron_delete.dialog.title=Delete Patron Account
+staff.patron.display.cmd_patron_delete.dialog.message=Completely OBLITERATE this patron account?  This is IRREVERSIBLE.
+staff.patron.display.cmd_patron_delete.dialog.confirmation=Check here to confirm this action.
+staff.patron.display.cmd_patron_delete.dialog.cancel=Cancel Deletion
+staff.patron.display.cmd_patron_delete.dialog.okay=Delete Account
+staff.patron.display.cmd_patron_delete.deny_deletion_of_super_user=You may not delete a super user through this interface.
+staff.patron.display.cmd_patron_delete.deny_deletion_of_self=You may not delete your own account.
 staff.patron.display.spawn_editor.editing_related_patron=Editing Related Patron
 staff.patron.display.init.retrieving_patron=Retrieving Patron...
 staff.patron.display.init.retrieving=Retrieving...

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-07-29 22:18:31 UTC (rev 13779)
@@ -119,6 +119,39 @@
                             document.getElementById('splitter_grippy').doCommand();
                         }
                     ],
+                    'cmd_patron_delete' : [
+                        ['command'],
+                        function(ev) {
+                            try {
+                                if (get_bool( obj.patron.super_user() )) {
+                                    alert($("patronStrings").getString('staff.patron.display.cmd_patron_delete.deny_deletion_of_super_user'));
+                                    return;
+                                }
+                                if (obj.patron.id() == obj.OpenILS.data.list.au[0].id()) {
+                                    alert($("patronStrings").getString('staff.patron.display.cmd_patron_delete.deny_deletion_of_self'));
+                                    return;
+                                }
+                                var rv = obj.error.yns_alert_original(
+                                    $("patronStrings").getString('staff.patron.display.cmd_patron_delete.dialog.message'),
+                                    $("patronStrings").getString('staff.patron.display.cmd_patron_delete.dialog.title'),
+                                    $("patronStrings").getString('staff.patron.display.cmd_patron_delete.dialog.okay'),
+                                    $("patronStrings").getString('staff.patron.display.cmd_patron_delete.dialog.cancel'),
+                                    null,
+                                    $("patronStrings").getString('staff.patron.display.cmd_patron_delete.dialog.confirmation')
+                                );
+                                //alert('rv = ' + rv + ' (' + typeof rv + ')');
+                                if (rv == 0) {
+                                    obj.network.simple_request(
+                                        'FM_AU_DELETE',
+                                        [ ses(), obj.patron.id() ]
+                                    );
+                                }
+                                obj.refresh_all();
+                            } catch(E) {
+                                obj.error.standard_unexpected_error_alert('Error in server/patron/display.js -> cmd_patron_delete: ',E);
+                            }
+                        }
+                    ],
 					'cmd_search_form' : [
 						['command'],
 						function(ev) {

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display.xul	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display.xul	2009-07-29 22:18:31 UTC (rev 13779)
@@ -106,6 +106,7 @@
 		<command id="cmd_patron_retrieve" />
 		<command id="cmd_patron_merge" />
 		<command id="cmd_patron_toggle_summary" />
+		<command id="cmd_patron_delete" />
 		<command id="cmd_search_form" />
 		<command id="cmd_verify_credentials" />
 		<command id="cmd_perm_editor" />

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display_horiz.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display_horiz.xul	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display_horiz.xul	2009-07-29 22:18:31 UTC (rev 13779)
@@ -106,6 +106,7 @@
 		<command id="cmd_patron_retrieve" />
 		<command id="cmd_patron_merge" />
 		<command id="cmd_patron_toggle_summary" />
+		<command id="cmd_patron_delete" />
 		<command id="cmd_search_form" />
 		<command id="cmd_verify_credentials" />
 		<command id="cmd_perm_editor" />

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul	2009-07-29 22:18:31 UTC (rev 13779)
@@ -95,8 +95,9 @@
                                     <menuitem label="&staff.patron.info.group.label;" accesskey="&staff.patron.info.group.accesskey;" command="cmd_patron_info_groups"/>
                                     <menuitem label="&staff.patron_display.verify_password.label;" accesskey="&staff.patron_display.verify_password.accesskey;" command="cmd_verify_credentials"/>
                                     <menuitem label="&staff.main.menu.admin.user_edit.label;" accesskey="&staff.main.menu.admin.user_edit.accesskey;" command="cmd_perm_editor"/>
+                                    <menuitem label="&staff.patron_display.toggle_summary.label;" accesskey="&staff.patron_display.toggle_summary.accesskey;" command="cmd_patron_toggle_summary"/>
+                                    <menuitem label="&staff.patron_display.delete_patron.label;" accesskey="&staff.patron_display.delete_patron.accesskey;" command="cmd_patron_delete"/>
                                     <menuitem label="&staff.patron.display_overlay.exit.label;" accesskey="&staff.patron.display_overlay.exit.accesskey;" command="cmd_patron_exit"/>
-                                    <menuitem label="&staff.patron_display.toggle_summary.label;" accesskey="&staff.patron_display.toggle_summary.label;" command="cmd_patron_toggle_summary"/>
                                 </menupopup>
                             </button>
                         </row>

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display_overlay.xul	2009-07-29 22:18:00 UTC (rev 13778)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display_overlay.xul	2009-07-29 22:18:31 UTC (rev 13779)
@@ -95,8 +95,9 @@
                                     <menuitem label="&staff.patron.info.group.label;" accesskey="&staff.patron.info.group.accesskey;" command="cmd_patron_info_groups"/>
                                     <menuitem label="&staff.patron_display.verify_password.label;" accesskey="&staff.patron_display.verify_password.accesskey;" command="cmd_verify_credentials"/>
                                     <menuitem label="&staff.main.menu.admin.user_edit.label;" accesskey="&staff.main.menu.admin.user_edit.accesskey;" command="cmd_perm_editor"/>
+                                    <menuitem label="&staff.patron_display.toggle_summary.label;" accesskey="&staff.patron_display.toggle_summary.accesskey;" command="cmd_patron_toggle_summary"/>
+                                    <menuitem label="&staff.patron_display.delete_patron.label;" accesskey="&staff.patron_display.delete_patron.accesskey;" command="cmd_patron_delete"/>
                                     <menuitem label="&staff.patron.display_overlay.exit.label;" accesskey="&staff.patron.display_overlay.exit.accesskey;" command="cmd_patron_exit"/>
-                                    <menuitem label="&staff.patron_display.toggle_summary.label;" accesskey="&staff.patron_display.toggle_summary.label;" command="cmd_patron_toggle_summary"/>
                                 </menupopup>
                             </button>
                         </row>



More information about the open-ils-commits mailing list