[OPEN-ILS-GENERAL] Canadian Addresses

Dan Scott denials at gmail.com
Mon Jun 2 13:39:48 EDT 2008


2008/5/23 Dan Scott <denials at gmail.com>:
> Hi Grant:
>
> 2008/5/23 Grant Johnson <fgjohnson at upei.ca>:
>> Good evening ...
>>
>> Anyone know how to fix the Patron Address screens?
>
> Sure!
>
>> Create, View and Edit in Staff Client/OPAC??
>>
>> - I need to have Province not State
>> - Postal Code not ZIP
>
>
> Edit Open-ILS/xul/staff_client/server/patron/user_editor.xhtml - there
> are two occurrences each of "State" and "Zip" to change (just change
> the label matching the exact case).
>
> Also change the same occurrences in
> Open-ILS/xul/staff_client/server/patron/ue.xhtml.
>
> (I think one of these files is probably deadwood but they're easy
> enough to change anyway).
>
>> - Default CAN not USA
>
> Edit Open-ILS/xul/staff_client/server/patron/ue_config.js and change
> the following lines at the top:
>
> const defaultState      = 'PE';
> const defaultCountry        = 'CAN';
>
> In the same file, you'll also probably want to change the zipRegex to
> match postal codes instead:
>
> const zipRegex      = /^[A-Z]\d[A-Z] \d[A-Z]\d$/; /* e.g. "C1A 4P3" --
> all caps, with a space */
>
> user_editor.js also sets a default state to GA - might as well change
> that one, too.
>
>>
>> We'll hopefully going to be importing a load of Patron records next week, and should understand this before we get started!
>
> Attached is a patch for the 1.2 branch that should help you along.
> Note that in trunk the labels, at least, will be translated into the
> en-CA locale so we'll have postal code / province - but we still have
> to figure out how to properly manage regexes for different regions.
>

And now I'm attaching an updated patch for rel_1_2_2 with some
additional Canuck-isms, based on testing in the wild (thanks UPEI!).

-- 
Dan Scott
Laurentian University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: canuck.patch
Type: text/x-diff
Size: 9546 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-general/attachments/20080602/bb39782e/canuck.bin


More information about the Open-ils-general mailing list