fixed above issue
Also adding js-based enforcement of the is_primary and is_billing checkboxes
I can still add two addresses via inline edit blocks - assigning Home location type to both addresses.
Should be completely working now in 4.2 and 4.3
Testing in 4.2 Revision: 42220
Found one "new" issue:
*Create new from Quick Add Block
Mouse over the second address added - there is no on-hover behavior (the dotted line and the 'edit address' link / icon are not shown). The 2nd address can't be edited inline unless you reload the entire page. (Hover on the first address is still active).
My thought is to open another issue about the buggy 4.2 address handling if desired.
The inline code in 4.2 is problematic for a number of reasons, and address handling is quite buggy. Another example: open a contact w/ multiple addresses and edit the last one. Every time you do, the "add address" link will get cloned!
Inline edit was refactored in 4.3 and address handling was rewritten so none of the above is an issue there. If we choose to fix this stuff in 4.2 - let's be careful to not merge changes to trunk!
I have fixed issue mentioned by Dave. Since lot of refactoring is done for 4.3, let's not backport non critical changes.
I'll do a last check in 4.2 and close if no critical problems.
Closing for 4.2. However, in 4.3 you can still add two inline addresses in sequence both with Home location type selected. Since the 4.3 code is different - opening a new issue for 4.3 inline address editing.
Problem still persist, here are the steps to replicate it.
1. Add a contact with 2 addresses
2. Contact summary click on primary address for edit and then click on second address for edit.
3. Mark second address as primary and Save.
4. Uncheck primary checkbox for first and Save
5. Then refresh the page, address is overwritten.