[open-ils-commits] r13768 - in trunk/Open-ILS: src/sql/Pg web/opac/locale/en-US xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 29 04:15:55 EDT 2009
Author: phasefx
Date: 2009-07-29 04:15:50 -0400 (Wed, 29 Jul 2009)
New Revision: 13768
Modified:
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.js
trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.xul
trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.js
trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.xul
Log:
Staff initials for standing penalties. Looks for org setting ui.circ.standing_penalty.require_initials to enable this feature.
The Apply/Modify button will jump to the initials textbox if empty.
No dedicated initials field in actor.user_standing_penalty, so appending to the note field. Not parsing notes for initials when editing, though we may want to (I'd argue for a dedicated field in
this case).
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-07-29 07:41:21 UTC (rev 13767)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-07-29 08:15:50 UTC (rev 13768)
@@ -1782,6 +1782,11 @@
null,
'bool' ),
+( 'ui.circ.standing_penalty.require_initials',
+ 'Require staff initials for entry/edit of standing penalties.',
+ null,
+ 'bool' ),
+
( 'ui.general.button_bar',
'Button bar',
null,
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-07-29 07:41:21 UTC (rev 13767)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-07-29 08:15:50 UTC (rev 13768)
@@ -1239,6 +1239,8 @@
<!ENTITY staff.patron_display.apply_penalty_dialog.cancel_btn.accesskey "C">
<!ENTITY staff.patron_display.apply_penalty_dialog.apply_btn.label "Apply">
<!ENTITY staff.patron_display.apply_penalty_dialog.apply_btn.accesskey "A">
+<!ENTITY staff.patron_display.apply_penalty_dialog.initials_entry.label "Initials">
+<!ENTITY staff.patron_display.apply_penalty_dialog.initials_entry.accesskey "I">
<!ENTITY staff.patron_display.edit_penalty_dialog.title "Modify Standing Penalty/Message">
<!ENTITY staff.patron_display.edit_penalty_dialog.header "Modify Standing Penalty/Message">
<!ENTITY staff.patron_display.edit_penalty_dialog.description "Notes, Alerts, Blocks">
@@ -1252,6 +1254,8 @@
<!ENTITY staff.patron_display.edit_penalty_dialog.cancel_btn.accesskey "C">
<!ENTITY staff.patron_display.edit_penalty_dialog.apply_btn.label "Modify">
<!ENTITY staff.patron_display.edit_penalty_dialog.apply_btn.accesskey "M">
+<!ENTITY staff.patron_display.edit_penalty_dialog.initials_entry.label "Initials">
+<!ENTITY staff.patron_display.edit_penalty_dialog.initials_entry.accesskey "I">
<!ENTITY staff.patron_editor_interface_label "Patron Edit">
<!ENTITY staff.patron_interface_label "Patron ">
<!ENTITY staff.patron_navbar.bills 'Bills'>
Modified: trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.js 2009-07-29 07:41:21 UTC (rev 13767)
+++ trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.js 2009-07-29 08:15:50 UTC (rev 13768)
@@ -24,6 +24,11 @@
build_penalty_menu();
+ var show_initials = String( data.hash.aous['ui.circ.standing_penalty.require_initials'] ) == 'true';
+ if (show_initials) {
+ document.getElementById('initials_box').hidden = false;
+ }
+
/* set widget values */
document.getElementById('csp_menupopup').setAttribute('value',xul_param('id',{'modal_xulG':true}));
if (xul_param('id',{'modal_xulG':true})==21) { // SILENT_NOTE
@@ -81,10 +86,19 @@
document.getElementById('apply_btn').addEventListener(
'command',
function() {
+ var note = document.getElementById('note_tb').value;
+ if (!document.getElementById('initials_box').hidden) {
+ var initials_tb = document.getElementById('initials_tb');
+ if (initials_tb.value == '') {
+ initials_tb.focus(); return;
+ } else {
+ note = note + ' - ' + initials_tb.value;
+ }
+ }
update_modal_xulG(
{
'id' : document.getElementById('csp_menupopup').getAttribute('value'),
- 'note' : document.getElementById('note_tb').value,
+ 'note' : note,
'modify' : 1
}
)
Modified: trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.xul 2009-07-29 07:41:21 UTC (rev 13767)
+++ trunk/Open-ILS/xul/staff_client/server/patron/edit_standing_penalty.xul 2009-07-29 08:15:50 UTC (rev 13768)
@@ -58,9 +58,15 @@
</toolbox>
<textbox id="note_tb" multiline="true" />
<hbox>
+ <hbox id="initials_box">
+ <label control="initials_tb"
+ value="&staff.patron_display.edit_penalty_dialog.initials_entry.label;"
+ accesskey="&staff.patron_display.edit_penalty_dialog.initials_entry.accesskey;"/>
+ <textbox id="initials_tb" />
+ </hbox>
<spacer flex="1"/>
<button id="cancel_btn" label="&staff.patron_display.edit_penalty_dialog.cancel_btn.label;" accesskey="&staff.patron_display.edit_penalty_dialog.cancel_btn.accesskey;" />
- <button id="apply_btn" label="&staff.patron_display.edit_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.edit_penalty_dialog.apply_btn.label;" />
+ <button id="apply_btn" label="&staff.patron_display.edit_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.edit_penalty_dialog.apply_btn.accesskey;" />
</hbox>
</window>
Modified: trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.js 2009-07-29 07:41:21 UTC (rev 13767)
+++ trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.js 2009-07-29 08:15:50 UTC (rev 13768)
@@ -24,6 +24,11 @@
build_penalty_menu();
+ var show_initials = String( data.hash.aous['ui.circ.standing_penalty.require_initials'] ) == 'true';
+ if (show_initials) {
+ document.getElementById('initials_box').hidden = false;
+ }
+
/* set widget behavior */
document.getElementById('csp_menulist').addEventListener(
'command',
@@ -64,10 +69,19 @@
document.getElementById('apply_btn').addEventListener(
'command',
function() {
+ var note = document.getElementById('note_tb').value;
+ if (!document.getElementById('initials_box').hidden) {
+ var initials_tb = document.getElementById('initials_tb');
+ if (initials_tb.value == '') {
+ initials_tb.focus(); return;
+ } else {
+ note = note + ' - ' + initials_tb.value;
+ }
+ }
update_modal_xulG(
{
'id' : document.getElementById('csp_menupopup').getAttribute('value'),
- 'note' : document.getElementById('note_tb').value,
+ 'note' : note,
'modify' : 1
}
)
Modified: trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.xul 2009-07-29 07:41:21 UTC (rev 13767)
+++ trunk/Open-ILS/xul/staff_client/server/patron/new_standing_penalty.xul 2009-07-29 08:15:50 UTC (rev 13768)
@@ -58,9 +58,15 @@
</toolbox>
<textbox id="note_tb" multiline="true" />
<hbox>
+ <hbox id="initials_box">
+ <label control="initials_tb"
+ value="&staff.patron_display.apply_penalty_dialog.initials_entry.label;"
+ accesskey="&staff.patron_display.apply_penalty_dialog.initials_entry.accesskey;"/>
+ <textbox id="initials_tb" />
+ </hbox>
<spacer flex="1"/>
<button id="cancel_btn" label="&staff.patron_display.apply_penalty_dialog.cancel_btn.label;" accesskey="&staff.patron_display.apply_penalty_dialog.cancel_btn.accesskey;" />
- <button id="apply_btn" label="&staff.patron_display.apply_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.apply_penalty_dialog.apply_btn.label;" />
+ <button id="apply_btn" label="&staff.patron_display.apply_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.apply_penalty_dialog.apply_btn.accesskey;" />
</hbox>
</window>
More information about the open-ils-commits
mailing list