[%
# l('[_1] ([_2])', ctx.user.ident_value, ctx.user.ident_type.name) | html
# XXX uncomment the above line to show primary
# identification. With a minor tweak it could
# alternatively be shown but partially obscured.
%]
[%
# cycle through the non-pending address. For each non-pending addr
# that has a corresponding pending addr, render the pending addr
# along the right inside it's own edit form
pending = {};
regular = [];
edit_addr_id = CGI.param('edit_address');
FOR addr IN ctx.user.addresses;
IF addr.pending == 't';
replaces = addr.replaces;
pending.$replaces = addr;
ELSE;
regular.push(addr);
END;
END;
FOR addr IN regular;
cur_id = addr.id;
pending_addr = pending.$cur_id;
%]
[% l("Address Type") %]
[% addr.address_type | html %]
[% l("Street") %]
[% addr.street1 | html %]
[% l("Street") %]
[% addr.street2 | html %]
[% l("City") %]
[% addr.city | html %]
[% l("County") %]
[% addr.county| html %]
[% l("State") %]
[% addr.state | html %]
[% l("Country") %]
[% addr.country | html %]
[% l("Zip") %]
[% addr.post_code | html %]
[% IF ctx.get_org_setting(ctx.user.home_ou.id, 'opac.allow_pending_address')
AND !pending_addr AND edit_addr_id != cur_id %]