Do not explicitly require the state field in org unit addresses.
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Mon, 10 Jun 2013 07:32:41 +0000 (10:32 +0300)
committerBen Shum <bshum@biblio.org>
Fri, 12 Jul 2013 19:33:01 +0000 (15:33 -0400)
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org-addr-state-null.sql [new file with mode: 0644]
Open-ILS/web/conify/global/actor/org_unit.html

index d9ea689..4c6d156 100644 (file)
@@ -605,7 +605,7 @@ CREATE TABLE actor.org_address (
        street2         TEXT,
        city            TEXT    NOT NULL,
        county          TEXT,
-       state           TEXT    NOT NULL,
+       state           TEXT,
        country         TEXT    NOT NULL,
        post_code       TEXT    NOT NULL,
     san         TEXT
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org-addr-state-null.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org-addr-state-null.sql
new file mode 100644 (file)
index 0000000..86d8bf3
--- /dev/null
@@ -0,0 +1,5 @@
+BEGIN;
+
+ALTER TABLE actor.org_address ALTER COLUMN state DROP NOT NULL;
+
+COMMIT;
\ No newline at end of file
index 6235e7f..8d49513 100644 (file)
                                                                        </tr>
                                                                        <tr>
                                                                                <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="billing_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_billing_address.city( this.getValue() )" required="true"></span></td>
-                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="billing_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_billing_address.state( this.getValue() )" required="true"></span></td>
+                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="billing_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_billing_address.state( this.getValue() )"></span></td>
                                                                                <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="billing_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_billing_address.post_code( this.getValue() )" required="true"></span></td>
                                                                        </tr>
                                                                        <tr>
                                                                        </tr>
                                                                        <tr>
                                                                                <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="holds_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_holds_address.city( this.getValue() )" required="true"></span></td>
-                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="holds_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_holds_address.state( this.getValue() )" required="true"></span></td>
+                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="holds_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_holds_address.state( this.getValue() )"></span></td>
                                                                                <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="holds_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_holds_address.post_code( this.getValue() )" required="true"></span></td>
                                                                        </tr>
                                                                        <tr>
                                                                        </tr>
                                                                        <tr>
                                                                                <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="mailing_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_mailing_address.city( this.getValue() )" required="true"></span></td>
-                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="mailing_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_mailing_address.state( this.getValue() )" required="true"></span></td>
+                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="mailing_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_mailing_address.state( this.getValue() )"></span></td>
                                                                                <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="mailing_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_mailing_address.post_code( this.getValue() )" required="true"></span></td>
                                                                        </tr>
                                                                        <tr>
                                                                        </tr>
                                                                        <tr>
                                                                                <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="ill_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_ill_address.city( this.getValue() )" required="true"></span></td>
-                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="ill_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_ill_address.state( this.getValue() )" required="true"></span></td>
+                                                                               <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="ill_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_ill_address.state( this.getValue() )"></span></td>
                                                                                <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="ill_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_ill_address.post_code( this.getValue() )" required="true"></span></td>
                                                                        </tr>
                                                                        <tr>