From: Jason Etheridge Date: Wed, 23 Nov 2011 13:23:12 +0000 (-0500) Subject: SMS column headers, receipt slip templates X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f21dbb33d156d93b8906aacd90cbb2755a7f4da6;p=working%2FEvergreen.git SMS column headers, receipt slip templates and edit entries for Actions for Selected Holds Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 8ecc211200..f5316beb09 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2509,8 +2509,12 @@ - + + + + + diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index c256315f8c..0dda428d5f 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -436,7 +436,7 @@ OpenILS.data.prototype = { }, 'hold_slip' : { 'type' : 'holds', - 'header' : 'This item needs to be routed to %route_to%:
\r\nBarcode: %item_barcode%
\r\nTitle: %item_title%
\r\n
\r\n%hold_for_msg%
\r\nBarcode: %PATRON_BARCODE%
\r\nNotify by phone: %notify_by_phone%
\r\nNotify by email: %notify_by_email%
\r\n', + 'header' : 'This item needs to be routed to %route_to%:
\r\nBarcode: %item_barcode%
\r\nTitle: %item_title%
\r\n
\r\n%hold_for_msg%
\r\nBarcode: %PATRON_BARCODE%
\r\nNotify by phone: %notify_by_phone%
\r\nNotified by text: %notify_by_text%
\r\nNotified by email: %notify_by_email%
\r\n', 'line_item' : '%formatted_note%
\r\n', 'footer' : '
\r\nRequest date: %request_date%
\r\nSlip Date: %TODAY_TRIM%
\r\nPrinted by %STAFF_FIRSTNAME% at %SHORTNAME%
\r\n
\r\n' }, @@ -448,7 +448,7 @@ OpenILS.data.prototype = { }, 'hold_transit_slip' : { 'type' : 'transits', - 'header' : 'This item needs to be routed to %route_to%:
\r\n%route_to_org_fullname%
\r\n%street1%
\r\n%street2%
\r\n%city_state_zip%
\r\n
\r\nBarcode: %item_barcode%
\r\nTitle: %item_title%
\r\nAuthor: %item_author%
\r\n
\r\n%hold_for_msg%
\r\nBarcode: %PATRON_BARCODE%
\r\nNotify by phone: %notify_by_phone%
\r\nNotify by email: %notify_by_email%
\r\n', + 'header' : 'This item needs to be routed to %route_to%:
\r\n%route_to_org_fullname%
\r\n%street1%
\r\n%street2%
\r\n%city_state_zip%
\r\n
\r\nBarcode: %item_barcode%
\r\nTitle: %item_title%
\r\nAuthor: %item_author%
\r\n
\r\n%hold_for_msg%
\r\nBarcode: %PATRON_BARCODE%
\r\nNotify by phone: %notify_by_phone%
\r\nNotified by text: %notify_by_text%
\r\nNotified by email: %notify_by_email%
\r\n', 'line_item' : '%formatted_note%
\r\n', 'footer' : '
\r\nRequest date: %request_date%
\r\nSlip Date: %TODAY_TRIM%
\r\nPrinted by %STAFF_FIRSTNAME% at %SHORTNAME%
\r\n
\r\n' }, @@ -926,6 +926,27 @@ OpenILS.data.prototype = { this.chain.push( function() { var f = gen_fm_retrieval_func( + 'csc', + [ + api.FM_CSC_RETRIEVE_VIA_PCRUD.app, + api.FM_CSC_RETRIEVE_VIA_PCRUD.method, + [ obj.session.key, {"id":{"!=":null}}, {"order_by":{"csc":"name"}} ], + false + ] + ); + try { + f(); + } catch(E) { + var error = 'Error: ' + js2JSON(E); + obj.error.sdump('D_ERROR',error); + throw(E); + } + } + ); + + this.chain.push( + function() { + var f = gen_fm_retrieval_func( 'acnp', [ api.FM_ACNP_RETRIEVE_VIA_PCRUD.app, diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index f7ecfe0f1f..4120b6feb9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -258,6 +258,7 @@ var api = { 'FM_CNAL_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.net_access_level.retrieve.all', 'secure' : false }, 'FM_CNCT_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.non_cat_types.retrieve.all', 'secure' : false }, 'FM_CRAHP_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.config.rules.age_hold_protect.retrieve.all', 'secure' : false }, + 'FM_CSC_RETRIEVE_VIA_PCRUD' : { 'app' : 'open-ils.pcrud', 'method' : 'open-ils.pcrud.search.csc.atomic' }, 'FM_CSP_PCRUD_SEARCH' : { 'app' : 'open-ils.pcrud', 'method' : 'open-ils.pcrud.search.csp.atomic', 'secure' : false }, 'FM_CST_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.standings.retrieve', 'secure' : false }, 'FM_MB_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.create' }, diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index e8213d9947..40ccdb5f82 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -2146,6 +2146,24 @@ circ.util.hold_columns = function(modify,params) { }, { 'persist' : 'hidden width ordinal', + 'id' : 'sms_notify', + 'label' : document.getElementById('commonStrings').getString('staff.ahr_sms_notify_label'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { return my.ahr.sms_notify(); } + }, + { + 'persist' : 'hidden width ordinal', + 'id' : 'sms_carrier', + 'label' : document.getElementById('commonStrings').getString('staff.ahr_sms_carrier_label'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { return data.hash.csc[ my.ahr.sms_carrier() ].name(); } + }, + { + 'persist' : 'hidden width ordinal', 'id' : 'prev_check_time', 'label' : document.getElementById('commonStrings').getString('staff.ahr_prev_check_time_label'), 'flex' : 1, @@ -2931,6 +2949,12 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che msg += print_data.notify_by_phone_msg; msg += '\n'; } + if (check.payload.hold.sms_notify()) { + print_data.notify_by_text_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.sms_notify', [check.payload.hold.sms_notify()]); + print_data.notify_by_text = check.payload.hold.sms_notify(); + msg += print_data.notify_by_text_msg; + msg += '\n'; + } if (get_bool(check.payload.hold.email_notify())) { var payload_email = au_obj.email() ? au_obj.email() : ''; print_data.notify_by_email_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.email_notify', [payload_email]); @@ -3309,6 +3333,12 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che msg += print_data.notify_by_phone_msg; msg += '\n'; } + if (check.payload.hold.sms_notify()) { + print_data.notify_by_text_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.sms_notify', [check.payload.hold.sms_notify()]); + print_data.notify_by_text = check.payload.hold.sms_notify(); + msg += print_data.notify_by_text_msg; + msg += '\n'; + } if (get_bool(check.payload.hold.email_notify())) { var payload_email = au_obj.email() ? au_obj.email() : ''; print_data.notify_by_email_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.email_notify', [payload_email]); diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index af45237a5a..218a256014 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -363,6 +363,7 @@ staff.circ.utils.holds.shelf_expire_time=Shelf Expire Time staff.circ.utils.payload.hold.patron=Hold for patron %1$s, %2$s %3$s staff.circ.utils.payload.hold.patron_alias=Hold for patron %1$s staff.circ.utils.payload.hold.phone_notify=Notify by phone: %1$s +staff.circ.utils.payload.hold.sms_notify=Notify by text: %1$s staff.circ.utils.payload.hold.email_notify=Notify by email: %1$s staff.circ.utils.payload.hold.request_date=Request Date: %1$s staff.circ.utils.payload.hold.slip_date=Slip Date: %1$s diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties index f73ab08a97..ce0ac8e692 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties @@ -57,6 +57,8 @@ staff.ahr_holdable_part_label=Holdable Part staff.ahr_issuance_label_label=Issuance Label staff.ahr_id_label=Hold ID staff.ahr_phone_notify_label=Phone Notify +staff.ahr_sms_notify_label=Text Notify +staff.ahr_sms_carrier_label=Text Carrier staff.ahr_pickup_lib_label=Pickup Library staff.ahr_prev_check_time_label=Previous Check Time staff.ahr_requestor_label=Requestor diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties index 4f0ced6a83..f910d3702a 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties @@ -171,6 +171,24 @@ staff.patron.holds.holds_edit_phone_notify.choose_phone_number=Choose a Hold Not staff.patron.holds.holds_edit_phone_notify.confirm_phone_number_change.singular=Are you sure you would like to change the Notification Phone Number for hold %1$s to "%2$s"? staff.patron.holds.holds_edit_phone_notify.confirm_phone_number_change.plural=Are you sure you would like to change the Notification Phone Number for holds %1$s to "%2$s"? staff.patron.holds.holds_edit_phone_notify.modifying_holds_title=Modifying Holds +staff.patron.holds.holds_edit_sms_notify.new_phone_number=Please enter a new mobile number for hold notification via text (leave the field empty to disable): +staff.patron.holds.holds_edit_sms_notify.btn_done.label=Done +staff.patron.holds.holds_edit_sms_notify.btn_done.accesskey=D +staff.patron.holds.holds_edit_sms_notify.btn_cancel.label=Cancel +staff.patron.holds.holds_edit_sms_notify.btn_cancel.accesskey=C +staff.patron.holds.holds_edit_sms_notify.choose_phone_number=Choose a Hold Notification Mobile Text Number +staff.patron.holds.holds_edit_sms_notify.confirm_phone_number_change.singular=Are you sure you would like to change the Notification Mobile/Text Number for hold %1$s to "%2$s"? +staff.patron.holds.holds_edit_sms_notify.confirm_phone_number_change.plural=Are you sure you would like to change the Notification Mobile/Text Number for holds %1$s to "%2$s"? +staff.patron.holds.holds_edit_sms_notify.modifying_holds_title=Modifying Holds +staff.patron.holds.holds_edit_sms_carrier.new_carrier=Please select a new mobile carrier for hold notification via text: +staff.patron.holds.holds_edit_sms_carrier.btn_done.label=Done +staff.patron.holds.holds_edit_sms_carrier.btn_done.accesskey=D +staff.patron.holds.holds_edit_sms_carrier.btn_cancel.label=Cancel +staff.patron.holds.holds_edit_sms_carrier.btn_cancel.accesskey=C +staff.patron.holds.holds_edit_sms_carrier.choose_carrier=Select a Hold Notification Mobile Text Carrier +staff.patron.holds.holds_edit_sms_carrier.confirm_carrier_change.singular=Are you sure you would like to change the Notification Mobile/Text Carrier for hold %1$s to "%2$s"? +staff.patron.holds.holds_edit_sms_carrier.confirm_carrier_change.plural=Are you sure you would like to change the Notification Mobile/Text Carrier for holds %1$s to "%2$s"? +staff.patron.holds.holds_edit_sms_carrier.modifying_holds_title=Modifying Holds staff.patron.holds.holds_edit_email_notify.description=Send email notifications (when appropriate)? The email address used is found in the hold recipient account. staff.patron.holds.holds_edit_email_notify.btn_email.label=Email staff.patron.holds.holds_edit_email_notify.btn_email.accesskey=E diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 190d630ed3..bec92d3c9c 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -598,6 +598,133 @@ patron.holds.prototype = { } } ], + + 'cmd_holds_edit_sms_notify' : [ + ['command'], + function() { + try { + var xml = ''; + xml += ''+$("patronStrings").getString('staff.patron.holds.holds_edit_sms_notify.new_phone_number')+''; + xml += ''; + xml += ''; + var bot_xml = ''; + bot_xml += '