]> git.evergreen-ils.org Git - working/NCIPServer.git/blob - templates/includes/UserOptionalFields.inc
Add UserOptionalFields to more templates.
[working/NCIPServer.git] / templates / includes / UserOptionalFields.inc
1 [% IF data.UserOptionalFields -%]
2 <UserOptionalFields>
3 [% IF data.UserOptionalFields.NameInformation -%]
4 <NameInformation>
5 <PersonalNameInformation>
6 <StructuredPersonalUserName>
7 [% IF data.UserOptionalFields.NameInformation.GivenName -%]
8 <GivenName>[% data.UserOptionalFields.NameInformation.GivenName | xml %]</GivenName>
9 [% END -%]
10 <Surname>[% data.UserOptionalFields.NameInformation.Surname | xml %]</Surname>
11 [% IF data.UserOptionalFields.NameInformation.Prefix -%]
12 <Prefix>[% data.UserOptionalFields.NameInformation.Prefix %]</Prefix>
13 [% END -%]
14 [% IF data.UserOptionalFields.NameInformation.Suffix -%]
15 <Suffix>[% data.UserOptionalFields.NameInformation.Suffix %]</Suffix>
16 [% END -%]
17 [% IF data.UserOptionalFields.NameInformation.Initials -%]
18 <Initials>[% data.UserOptionalFields.NameInformation.Initials %]</Initials>
19 [% END -%]
20 </StructuredPersonalUserName>
21 </PersonalNameInformation>
22 </NameInformation>
23 [% END -%]
24 [% IF data.UserOptionalFields.UserAddressInformation -%]
25 [% FOREACH element IN data.UserOptionalFields.UserAddressInformation -%]
26 <UserAddressInformation>
27 <UserAddressRoleType>[% element.UserAddressRoleType | xml %]</UserAddressRoleType>
28 [% IF element.PhysicalAddress -%]
29 <PhysicalAddress>
30 <StructuredAddress>
31 <Line1>[% element.PhysicalAddress.Line1 | xml %]</Line1>
32 [% IF element.PhysicalAddress.Line2 -%]
33 <Line2>[% element.PhysicalAddress.Line2 | xml %]</Line2>
34 [% END -%]
35 [% IF element.PhysicalAddress.Locality -%]
36 <Locality>[% element.PhysicalAddress.Locality | xml %]</Locality>
37 [% END -%]
38 [% IF element.PhysicalAddress.Region -%]
39 <Region>[% element.PhysicalAddress.Region | xml %]</Region>
40 [% END -%]
41 [% IF element.PhysicalAddress.PostalCode -%]
42 <PostalCode>[% element.PhysicalAddress.PostalCode | xml %]</PostalCode>
43 [% END -%]
44 [% IF element.PhysicalAddress.Country -%]
45 <Country>[% element.PhysicalAddress.Country | xml %]</Country>
46 [% END -%]
47 </StructuredAddress>
48 </PhysicalAddress>
49 [% ELSIF element.ElectronicAddress -%]
50 <ElectronicAddress>
51 <ElectronicAddressType>[% element.ElectronicAddress.Type | xml %]</ElectronicAddressType>
52 <ElectronicAddressData>[% element.ElectronicAddress.Data | xml %]</ElectronicAddressData>
53 </ElectronicAddress>
54 [% END -%]
55 </UserAddressInformation>
56 [% END -%]
57 [% END -%]
58 [% IF data.UserOptionalFields.UserPrivilege -%]
59 [% FOREACH privilege IN data.UserOptionalFields.UserPrivilege -%]
60 <UserPrivilege>
61 <AgencyId>[% privilege.AgencyId | xml -%]</AgencyId>
62 <AgencyUserPrivilegeType>[% privilege.AgencyUserPrivilegeType | xml %]</AgencyUserPrivilegeType>
63 [% IF privilege.ValidFromDate -%]
64 <ValidFromDate>[% privilege.ValidFromDate | xml %]</ValidFromDate>
65 [% END -%]
66 [% IF privilege.ValidToDate -%]
67 <ValidToDate>[% privilege.ValidToDate | xml %]</ValidToDate>
68 [% END -%]
69 [% IF privilege.UserPrivilegeDescription -%]
70 <UserPrivilegeDescription>[% privilege.UserPrivilegeDescription | xml %]</UserPrivilegeDescription>
71 [% END -%]
72 [% IF privilege.UserPrivilegeStatus -%]
73 <UserPrivilegeStatus>
74 <UserPrivilegeStatusType>
75 [% privilege.UserPrivilegeStatus.UserPrivilegeStatusType | xml %]
76 </UserPrivilegeStatusType>
77 [% IF privilege.UserPrivilegeStatus.DateOfUserPrivilegeStatus -%]
78 <DateOfUserPrivilegeStatus>
79 [% privilege.UserPrivilegeStatus.DateOfUserPrivilegeStatus | xml %]
80 </DateOfUserPrivilegeStatus>
81 [% END -%]
82 </UserPrivilegeStatus>
83 [% END -%]
84 </UserPrivilege>
85 [% END -%]
86 [% END -%]
87 [% IF data.UserOptionalFields.UserLanguage -%]
88 [% FOREACH language IN data.UserOptionalFields.UserLanguage -%]
89 <UserLanguage>[% language | xml %]</UserLanguage>
90 [% END -%]
91 [% END -%]
92 [% IF data.UserOptionalFields.BlockOrTrap -%]
93 [% FOREACH block IN data.UserOptionalFields.BlockOrTrap -%]
94 <BlockOrTrap>
95 <AgencyId>[% block.AgencyId | xml %]</AgencyId>
96 <BlockOrTrapType>[% block.BlockOrTrapType | xml %]</BlockOrTrapType>
97 [% IF block.ValidFromDate -%]
98 <ValidFromDate>[% block.ValidFromDate %]</ValidFromDate>
99 [% END -%]
100 [% IF block.ValidToDate -%]
101 <ValidToDate>[% block.ValidToDate %]</ValidToDate>
102 [% END %]
103 </BlockOrTrap>
104 [% END -%]
105 [% END -%]
106 </UserOptionalFields>
107 [% END -%]