[open-ils-commits] [GIT] Evergreen ILS branch master updated. dd0ad7d8045bae6a1c3a2ca2f067fd350da05f87

Evergreen Git git at git.evergreen-ils.org
Fri Jun 7 16:21:35 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  dd0ad7d8045bae6a1c3a2ca2f067fd350da05f87 (commit)
       via  a9d5cd96f2e4cc6684002538733fcc960e2ec75c (commit)
       via  2fd3e8a20e73f78bb1f997fbdd120dea4f24a3b8 (commit)
      from  d4d42526de97ce1aba91d76de0f2dfad5ee3711b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dd0ad7d8045bae6a1c3a2ca2f067fd350da05f87
Author: Ben Shum <bshum at biblio.org>
Date:   Fri Jun 7 16:21:07 2013 -0400

    Stamping upgrade script for making state not required
    
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 1d0369a..7180d01 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0798', :eg_version); -- tsbere/Dyrcona/dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0799', :eg_version); -- mrpeters/paxed/bshum
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql b/Open-ILS/src/sql/Pg/upgrade/0799.state_field_required_toggle.sql
similarity index 97%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
rename to Open-ILS/src/sql/Pg/upgrade/0799.state_field_required_toggle.sql
index 9562259..6ac1315 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0799.state_field_required_toggle.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0799', :eg_version);
 
 -- allow state to be null
 ALTER TABLE actor.usr_address ALTER COLUMN state DROP NOT NULL;

commit a9d5cd96f2e4cc6684002538733fcc960e2ec75c
Author: Ben Shum <bshum at biblio.org>
Date:   Wed Jun 5 00:40:53 2013 -0400

    LP1079041 - making state not required (continued)
    
    The last commit did not add the default YAOUS to the seed data. Also, some
    wording tweaks to bring the content in line with the existing entries for
    consistency.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>

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 c679de4..d181ff4 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4556,6 +4556,33 @@ INSERT into config.org_unit_setting_type
         'coust', 'description'),
     'bool', null)
 
+,( 'ui.patron.edit.au.state.require', 'gui',
+    oils_i18n_gettext('ui.patron.edit.au.state.require',
+        'Require State field on patron registration',
+        'coust', 'label'),
+    oils_i18n_gettext('ui.patron.edit.au.state.require',
+        'The State field will be required on the patron registration screen.',
+        'coust', 'description'),
+    'bool', null)
+
+,( 'ui.patron.edit.au.state.show', 'gui',
+    oils_i18n_gettext('ui.patron.edit.au.state.show',
+        'Show State field on patron registration',
+        'coust', 'label'),
+    oils_i18n_gettext('ui.patron.edit.au.state.show',
+        'The State 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.state.suggest', 'gui',
+    oils_i18n_gettext('ui.patron.edit.au.state.suggest',
+        'Suggest State field on patron registration',
+        'coust', 'label'),
+    oils_i18n_gettext('ui.patron.edit.au.state.suggest',
+        'The State 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)
+
 ,( 'ui.patron.edit.aua.post_code.example', 'gui',
     oils_i18n_gettext('ui.patron.edit.aua.post_code.example',
         'Example for post_code field on patron registration',
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
index 8289231..9562259 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
@@ -2,7 +2,7 @@ BEGIN;
 
 SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
 
--- state can no longer be a "not null"
+-- allow state to be null
 ALTER TABLE actor.usr_address ALTER COLUMN state DROP NOT NULL;
 
 -- create new YAOUS
@@ -13,13 +13,13 @@ INSERT into config.org_unit_setting_type
         'gui',
         oils_i18n_gettext(
             'ui.patron.edit.au.state.require',
-            'Require State on registration',
+            'Require State field on patron registration',
             'coust',
             'label'
         ),
         oils_i18n_gettext(
             'ui.patron.edit.au.state.require',
-            'Require the State field to be filled when registering or editing a patron.',
+            'The State field will be required on the patron registration screen.',
             'coust',
             'description'
         ),
@@ -33,13 +33,13 @@ INSERT into config.org_unit_setting_type
         'gui',
         oils_i18n_gettext(
             'ui.patron.edit.au.state.show',
-            'Show State on registration',
+            'Show State field on patron registration',
             'coust',
             'label'
         ),
         oils_i18n_gettext(
             'ui.patron.edit.au.state.show',
-            'Show the state field when registering or editing a patron.',
+            'The State 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'
         ),
@@ -53,13 +53,13 @@ INSERT into config.org_unit_setting_type
         'gui',
         oils_i18n_gettext(
             'ui.patron.edit.au.state.suggest',
-            'Suggest State on registration',
+            'Suggest State field on patron registration',
             'coust',
             'label'
         ),
         oils_i18n_gettext(
             'ui.patron.edit.au.state.suggest',
-            'Suggest filling the state field when registering or editing a patron.',
+            'The State 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'
         ),

commit 2fd3e8a20e73f78bb1f997fbdd120dea4f24a3b8
Author: Michael Peters <mrpeters at library.in.gov>
Date:   Thu Nov 15 12:49:05 2012 -0500

    Make the "state" field in registration a togglable YAOUS
    
    Some countries do not use "State" therefore we need to create
    a YAOUS to make it non-required/displaying.  This also requires
    that we no longer force a "not null" on state in actor.usr_address.
    
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/sql/Pg/005.schema.actors.sql b/Open-ILS/src/sql/Pg/005.schema.actors.sql
index 8d63430..f27af04 100644
--- a/Open-ILS/src/sql/Pg/005.schema.actors.sql
+++ b/Open-ILS/src/sql/Pg/005.schema.actors.sql
@@ -564,7 +564,7 @@ CREATE TABLE actor.usr_address (
 	street2			TEXT,
 	city			TEXT	NOT NULL,
 	county			TEXT,
-	state			TEXT	NOT NULL,
+	state			TEXT,
 	country			TEXT	NOT NULL,
 	post_code		TEXT	NOT NULL,
     pending         BOOL    NOT NULL DEFAULT FALSE,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
new file mode 100644
index 0000000..8289231
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
@@ -0,0 +1,69 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+-- state can no longer be a "not null"
+ALTER TABLE actor.usr_address ALTER COLUMN state DROP NOT NULL;
+
+-- create new YAOUS
+INSERT into config.org_unit_setting_type
+    (name, grp, label, description, datatype)
+    VALUES (
+        'ui.patron.edit.au.state.require',
+        'gui',
+        oils_i18n_gettext(
+            'ui.patron.edit.au.state.require',
+            'Require State on registration',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'ui.patron.edit.au.state.require',
+            'Require the State field to be filled when registering or editing a patron.',
+            'coust',
+            'description'
+        ),
+        'bool'
+    );
+
+INSERT into config.org_unit_setting_type
+    (name, grp, label, description, datatype)
+    VALUES (
+        'ui.patron.edit.au.state.show',
+        'gui',
+        oils_i18n_gettext(
+            'ui.patron.edit.au.state.show',
+            'Show State on registration',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'ui.patron.edit.au.state.show',
+            'Show the state field when registering or editing a patron.',
+            'coust',
+            'description'
+        ),
+        'bool'
+    );	
+
+INSERT into config.org_unit_setting_type
+    (name, grp, label, description, datatype)
+    VALUES (
+        'ui.patron.edit.au.state.suggest',
+        'gui',
+        oils_i18n_gettext(
+            'ui.patron.edit.au.state.suggest',
+            'Suggest State on registration',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'ui.patron.edit.au.state.suggest',
+            'Suggest filling the state field when registering or editing a patron.',
+            'coust',
+            'description'
+        ),
+        'bool'
+    );		
+
+COMMIT;
diff --git a/Open-ILS/src/templates/actor/user/register_table.tt2 b/Open-ILS/src/templates/actor/user/register_table.tt2
index f9bdf90..ba3f246 100644
--- a/Open-ILS/src/templates/actor/user/register_table.tt2
+++ b/Open-ILS/src/templates/actor/user/register_table.tt2
@@ -91,7 +91,7 @@
     <tr fmclass='aua' fmfield='street2' type='addr-template' required='show'/>
     <tr fmclass='aua' fmfield='city' type='addr-template' required='required'/>
     <tr fmclass='aua' fmfield='county' type='addr-template' required='show'/>
-    <tr fmclass='aua' fmfield='state' type='addr-template' required='required'/>
+    <tr fmclass='aua' fmfield='state' type='addr-template'/>
     <tr fmclass='aua' fmfield='country' type='addr-template' required='required'/>
     <tr fmclass='aua' fmfield='valid' type='addr-template' required='show'/>
     <tr fmclass='aua' fmfield='within_city_limits' type='addr-template' required='show'/>
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 eee5569..810ab3a 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -189,7 +189,10 @@ function load() {
         'ui.patron.edit.default_suggested',
         'opac.barcode_regex',
         'opac.username_regex',
-        'sms.enable'
+        'sms.enable',
+        'ui.patron.edit.au.state.require',
+        'ui.patron.edit.au.state.suggest',
+        'ui.patron.edit.au.state.show'
     ]);
 
     for(k in orgSettings)

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/005.schema.actors.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   27 ++++++++
 .../upgrade/0799.state_field_required_toggle.sql   |   69 ++++++++++++++++++++
 .../src/templates/actor/user/register_table.tt2    |    2 +-
 Open-ILS/web/js/ui/default/actor/user/register.js  |    5 +-
 6 files changed, 103 insertions(+), 4 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0799.state_field_required_toggle.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list