Index: branches/5.1.x/units/addresses/addresses_config.php =================================================================== diff -u -r13100 -r13147 --- branches/5.1.x/units/addresses/addresses_config.php (.../addresses_config.php) (revision 13100) +++ branches/5.1.x/units/addresses/addresses_config.php (.../addresses_config.php) (revision 13147) @@ -1,6 +1,6 @@ Array('' => Array('Sorting' => Array('IsProfileAddress' => 'desc')) ), - 'Fields' => Array( - 'AddressId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'To' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Company' => Array('type' => 'string','not_null' => '1','default' => ''), - 'Phone' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Fax' => Array('type' => 'string','not_null' => '1','default' => ''), - 'Email' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''), - 'Address1' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Address2' => Array('type' => 'string','not_null' => '1','default' => ''), - 'City' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'State' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', - 'options' => Array(), - 'option_key_field'=>'DestAbbr', 'option_title_field'=>'Translation', - 'not_null' => '1', 'default' => ''), + 'Fields' => Array( + 'AddressId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0), + 'To' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), + 'Company' => Array('type' => 'string','not_null' => '1','default' => ''), + 'Phone' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), + 'Fax' => Array('type' => 'string','not_null' => '1','default' => ''), + 'Email' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''), + 'Address1' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), + 'Address2' => Array('type' => 'string','not_null' => '1','default' => ''), + 'City' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), + 'State' => Array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => Array(), + 'not_null' => '1', 'default' => '' + ), - 'Zip' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), - 'Country' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT %1$s - FROM '.TABLE_PREFIX.'StdDestinations - LEFT JOIN '.TABLE_PREFIX.'Phrase - ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName - WHERE - DestType = 1 AND LanguageId = %2$s - ORDER BY Translation', - 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', - 'not_null' => '1', 'required' => 1, 'default' => ''), + 'Zip' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''), + 'Country' => Array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT %1$s + FROM '.TABLE_PREFIX.'StdDestinations + LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName + WHERE DestType = 1 + ORDER BY l%2$s_Translation', + 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', + 'not_null' => '1', 'required' => 1, 'default' => '' + ), - 'LastUsedAsBilling' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'LastUsedAsShipping' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'IsProfileAddress' => Array('type' => 'int','not_null' => 1, 'default' => 0), - ), + 'LastUsedAsBilling' => Array('type' => 'int','not_null' => 1, 'default' => 0), + 'LastUsedAsShipping' => Array('type' => 'int','not_null' => 1, 'default' => 0), + 'IsProfileAddress' => Array('type' => 'int','not_null' => 1, 'default' => 0), + ), 'VirtualFields' => Array( 'ShortAddress' => Array('type'=>'string'),