From 94dfd1b6f53bbcc41a32525dc8aca596a84e0e47 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Mon, 30 Jan 2012 11:55:23 -0500 Subject: [PATCH] Add a prefix field to patron registration interface Signed-off-by: Michael Peters Signed-off-by: Mike Rylander --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 27 ++++++++++++++ .../upgrade/yyyy.schema.patron_reg_prefix.sql | 36 +++++++++++++++++++ .../templates/actor/user/register_table.tt2 | 1 + .../web/js/ui/default/actor/user/register.js | 3 ++ 4 files changed, 67 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/upgrade/yyyy.schema.patron_reg_prefix.sql 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 e17f0eec25..88e7d55f64 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -4412,6 +4412,33 @@ INSERT into config.org_unit_setting_type 'coust', 'description'), 'bool', null) +,( 'ui.patron.edit.au.prefix.require', 'gui', + oils_i18n_gettext('ui.patron.edit.au.prefix.require', + 'Require prefix field on patron registration', + 'coust', 'label'), + oils_i18n_gettext('ui.patron.edit.au.prefix.require', + 'The prefix field will be required on the patron registration screen.' + 'coust', 'description'), + 'bool', null) + +,( 'ui.patron.edit.au.prefix.show', 'gui', + oils_i18n_gettext('ui.patron.edit.au.prefix.show', + 'Show prefix field on patron registration', + 'coust', 'label'), + oils_i18n_gettext('ui.patron.edit.au.prefix.show', + 'The prefix field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.' + 'coust', 'description'), + 'bool', null) + +,( 'ui.patron.edit.au.prefix.suggest', 'gui', + oils_i18n_gettext('ui.patron.edit.au.prefix.suggest', + 'Suggest prefix field on patron registration', + 'coust', 'label'), + oils_i18n_gettext('ui.patron.edit.au.prefix.suggest', + 'The prefix field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.' + 'coust', 'description'), + 'bool', null) + ,( 'ui.patron.edit.au.second_given_name.show', 'gui', oils_i18n_gettext('ui.patron.edit.au.second_given_name.show', 'Show second_given_name field on patron registration', diff --git a/Open-ILS/src/sql/Pg/upgrade/yyyy.schema.patron_reg_prefix.sql b/Open-ILS/src/sql/Pg/upgrade/yyyy.schema.patron_reg_prefix.sql new file mode 100644 index 0000000000..2907c342ed --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/yyyy.schema.patron_reg_prefix.sql @@ -0,0 +1,36 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('yyyy', :eg_version); + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype, fm_class ) VALUES + +( 'ui.patron.edit.au.prefix.require', 'gui', + oils_i18n_gettext('ui.patron.edit.au.prefix.require', + 'Require prefix field on patron registration', + 'coust', 'label'), + oils_i18n_gettext('ui.patron.edit.au.prefix.require', + 'The prefix field will be required on the patron registration screen.' + 'coust', 'description'), + 'bool', null) + +,( 'ui.patron.edit.au.prefix.show', 'gui', + oils_i18n_gettext('ui.patron.edit.au.prefix.show', + 'Show prefix field on patron registration', + 'coust', 'label'), + oils_i18n_gettext('ui.patron.edit.au.prefix.show', + 'The prefix field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.' + 'coust', 'description'), + 'bool', null) + +,( 'ui.patron.edit.au.prefix.suggest', 'gui', + oils_i18n_gettext('ui.patron.edit.au.prefix.suggest', + 'Suggest prefix field on patron registration', + 'coust', 'label'), + oils_i18n_gettext('ui.patron.edit.au.prefix.suggest', + 'The prefix field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.' + 'coust', 'description'), + 'bool', null) +; + +COMMIT; diff --git a/Open-ILS/src/templates/actor/user/register_table.tt2 b/Open-ILS/src/templates/actor/user/register_table.tt2 index 1a4129510d..775a19ae30 100644 --- a/Open-ILS/src/templates/actor/user/register_table.tt2 +++ b/Open-ILS/src/templates/actor/user/register_table.tt2 @@ -26,6 +26,7 @@ + diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index 0f23877183..d56622c00b 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -127,6 +127,9 @@ function load() { 'ui.patron.registration.require_address', 'circ.holds.behind_desk_pickup_supported', 'circ.patron_edit.clone.copy_address', + 'ui.patron.edit.au.prefix.require', + 'ui.patron.edit.au.prefix.show', + 'ui.patron.edit.au.prefix.suggest', 'ui.patron.edit.au.second_given_name.show', 'ui.patron.edit.au.second_given_name.suggest', 'ui.patron.edit.au.suffix.show', -- 2.43.2