From 5ec31496a2343b9230f025a61501bdf0858b4620 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 17 Dec 2009 07:40:06 +0000 Subject: [PATCH] Org unit setting for requiring staff initials with copy/patron notes, and I18N for similar setting for standing penalties. Implemented the initial fields for copy/patron notes. Localizable format for staff initials, and option for an initials date (though it's %F format for saving space and not localized). Removed the "Note added." speedbump alerts. git-svn-id: svn://svn.open-ils.org/ILS/trunk@15183 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 9 +++++++-- .../0117.data.org-setting-notes-require-initials.sql | 11 +++++++++++ Open-ILS/xul/staff_client/server/cat/copy_notes.xul | 19 ++++++++++--------- .../staff_client/server/locale/en-US/cat.properties | 2 +- .../server/locale/en-US/common.properties | 2 ++ .../server/locale/en-US/patron.properties | 2 +- .../server/patron/edit_standing_penalty.js | 3 ++- .../xul/staff_client/server/patron/info_notes.xul | 14 ++++++++------ .../server/patron/new_standing_penalty.js | 3 ++- 10 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0117.data.org-setting-notes-require-initials.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 4d8d346fb8..8714fad168 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -51,7 +51,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0116'); -- Scott McKellar +INSERT INTO config.upgrade_log (version) VALUES ('0117'); -- phasefx CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 64a2e25d43..096bc2722e 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1719,8 +1719,13 @@ INSERT into config.org_unit_setting_type 'bool' ), ( 'ui.circ.standing_penalty.require_initials', - 'Require staff initials for entry/edit of standing penalties.', - null, + oils_i18n_gettext('ui.circ.standing_penalty.require_initials', 'GUI: Require staff initials for entry/edit of standing penalties.', 'coust', 'label'), + oils_i18n_gettext('ui.circ.standing_penalty.require_initials', 'Appends staff initials and edit date into penalty note.', 'coust', 'description'), + 'bool' ), + +( 'ui.circ_and_cat.notes.require_initials', + oils_i18n_gettext('ui.circ_and_cat.notes.require_initials', 'GUI: Require staff initials for entry/edit of item and patron notes.', 'coust', 'label'), + oils_i18n_gettext('ui.circ_and_cat.notes.require_initials', 'Appends staff initials and edit date into note content.', 'coust', 'description'), 'bool' ), ( 'ui.general.button_bar', diff --git a/Open-ILS/src/sql/Pg/upgrade/0117.data.org-setting-notes-require-initials.sql b/Open-ILS/src/sql/Pg/upgrade/0117.data.org-setting-notes-require-initials.sql new file mode 100644 index 0000000000..9bb2d07116 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0117.data.org-setting-notes-require-initials.sql @@ -0,0 +1,11 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0117'); -- phasefx + +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES +( 'ui.circ_and_cat.notes.require_initials', + oils_i18n_gettext('ui.circ_and_cat.notes.require_initials', 'GUI: Require staff initials for entry/edit of item and patron notes.', 'coust', 'label'), + oils_i18n_gettext('ui.circ_and_cat.notes.require_initials', 'Appends staff initials and edit date into note content.', 'coust', 'description'), + 'bool' ); + +COMMIT; diff --git a/Open-ILS/xul/staff_client/server/cat/copy_notes.xul b/Open-ILS/xul/staff_client/server/cat/copy_notes.xul index 1d9d0b5cf6..a3dd7b2b9a 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_notes.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_notes.xul @@ -159,35 +159,36 @@ \ \ \ - \ - \ + '; + var show_initials = String( g.data.hash.aous['ui.circ_and_cat.notes.require_initials'] ) == 'true'; + if (show_initials) { + xml += ''; + } + xml += ' \