Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing: ==> bankercode [in template "10153#10191#6590055" at line 52, column 6] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #if bankercode?starts_with("amp") && ... [in template "10153#10191#6590055" at line 52, column 1] ----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
2<#assign url404 = '/error/404.html' >
3<#assign oadURL = propsUtil.get('elan.oad.url') >
4<#assign url = themeDisplay.getURLCurrent() >
5<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
6<#assign projectIds = ["12", "13", "14", "15", "16"]>
7
8<#if qstringmap["ecid"]?has_content>
9 <#assign ecidExt = qstringmap["ecid"]?first>
10 <#assign ecidExt = htmlUtil.escape(ecidExt)>
11 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
12 <#assign ecidExt = "&ecid=" + ecidExt>
13<#else>
14 <#assign ecidExt="">
15</#if>
16
17<#if qstringmap["bankercode"]?has_content>
18 <#assign bankercode = qstringmap["bankercode"]?first>
19 <#assign bankercode = htmlUtil.escape(bankercode)>
20 <#assign bankercode = htmlUtil.escapeJS(bankercode)>
21 <#assign isEmployee = false>
22
23 <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bankercode)>
24 <#if fiData?first?has_content>
25 <#assign fi = fiData?first>
26 <#if projectIds?seq_index_of(fi.projectId) != -1>
27 <#assign subbu_special = fi.offerId>
28 </#if>
29 <#if fi.projectType == "emp">
30 <#assign isEmployee = true>
31 </#if>
32 </#if>
33
34 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bankercode)>
35 <#list bData as b>
36 <#assign rLC = b.reallocationcode >
37 <#assign lc = b.locationcode >
38 <#assign mappedLC = b.mappedLocationCode >
39 </#list>
40<#else>
41 <script>
42 console.log("MainProductBcode missing");
43 location.href = '${url404}';
44 </script>
45</#if>
46
47<#if url?contains('11t1')>
48 <#assign tier = '11t1'>
49<#elseif url?contains('11t2')>
50 <#assign tier = '11t2'>
51</#if>
52<#if bankercode?starts_with("amp") && (url?contains("11t1m"))>
53 <#assign ameriprise = true>
54<#else>
55 <#assign ameriprise = false>
56</#if>
57<#if ameriprise>
58 <#assign tier = '11t1m'>
59</#if>
60<#assign environment = url?replace('/${tier}.*','','r')>
61
62
63<#if mappedLC?has_content && !ameriprise>
64 <#assign lc = mappedLC >
65</#if>
66
67<#if lc?has_content>
68 <#assign prefix = "00000" >
69 <#assign lcWithPrefix = prefix + lc >
70 <#assign withPrefixLength = lcWithPrefix?length >
71 <#assign startHere = withPrefixLength - 5>
72 <#assign lc = lcWithPrefix?substring(startHere)>
73 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
74 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
75
76 <#assign clientProfile = clientProfileList?first>
77 <#assign partnerName = clientProfile.getMarketingNameLong()>
78 <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case>
79 <#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!>
80 <#-- <#assign cdnLogoUrl = "https://828cf7dcac86961192f7-10b53e8cad49907c7863edad15b39700.ssl.cf2.rackcdn.com"> -->
81 <#assign pbu = clientProfile.getPbu()>
82 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
83
84 <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)>
85 <#if (optoutData?size == 0)>
86 <#if (subbu_special?has_content)>
87 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
88 <#else>
89 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
90 </#if>
91 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! />
92 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
93 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
94 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
95 <#assign partnerUrl = 'https://' + partnerUrl>
96 </#if>
97 <#if (fiCardsData?size > 0)>
98 <#assign temp = []>
99 <#assign offerTypeList = []>
100 <#assign index = 0>
101 <#list fiCardsData as fib>
102 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
103 <#assign offerTypeList = offerTypeList + [fib.offerType]>
104 <#assign temp = temp + fiCardsData[index..index]>
105 </#if>
106 <#assign index = index + 1>
107 </#list>
108 <#assign fiCardsData = temp>
109 <#if !(fiCardsData?size > 0)>
110 <script>
111 console.log("empty card/offerType List");
112 location.href = '${url404}';
113 </script>
114 </#if>
115 <#if ameriprise>
116 <#assign lc_used = mappedLC>
117 <#else>
118 <#assign lc_used = lc>
119 </#if>
120 <div class="content-container content-container-main" title="${partnerName!''}">
121 <header class="jn-header">
122 <div class="back-overview hide-desktop">
123 <a href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a>
124 </div>
125 <div class="header-main-logo" title="${partnerName!''}">
126 <#if partnerUrl?has_content>
127 <a href="${partnerUrl!''}" title="${partnerName!''}">
128 <img src="${cdnLogoUrl!''}/${logoFileName!''}" title="${partnerName!''} Logo" alt="${partnerName!''} Logo">
129 </a>
130 <#else>
131 <a title="${partnerName!''}">
132 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo">
133 </a>
134 </#if>
135 </div>
136
137 <div class="styled-select slate">
138 <select>
139 <#assign consumerOfferTypes =['101', '108', '109', '104', '138', '154', '141', '147', '115']>
140
141 <#list fiCardsData as fib>
142 <#if ameriprise>
143 <#if (fib.offerType=="101")>
144 <#assign productURL="premier-visa-signature">
145 <#assign productName="Ameriprise Premier Visa Signature">
146 <#elseif (fib.offerType=="103")>
147 <#assign productURL = "visa-signature">
148 <#assign productName = "Ameriprise Visa Signature">
149 </#if>
150 <#else>
151 <#if (fib.offerType=="108" || fib.offerType=="109")>
152 <#assign productURL="consumer-platinum2103">
153 <#assign productName="Platinum Card">
154 <#elseif fib.offerType=="147">
155 <#assign productURL = "max-cash-secured">
156 <#assign productName = "Max Cash Secured Card" >
157 <#elseif (fib.offerType=="104")>
158 <#assign productURL = "max-cash">
159 <#assign productName = "Max Cash Preferred Card">
160 <#elseif (fib.offerType=="101" || fib.offerType=="103")>
161 <#assign productURL = "consumer-edr2112">
162 <#assign productName = "Everyday Rewards+">
163 <#elseif fib.offerType == "115">
164 <#assign productURL = "secured">
165 <#assign productName = "Secured Card" >
166 <#elseif fib.offerType == "141">
167 <#assign productURL = "college-real-rewards">
168 <#assign productName = "College Real Rewards" >
169 <#elseif fib.offerType == "144">
170 <#assign productURL = "smart-business-rewards">
171 <#assign productName = "Smart Business Rewards Card" >
172 <#elseif fib.offerType == "128">
173 <#assign productURL = "business-cash-preferred">
174 <#assign productName = "Business Cash Preferred" >
175 <#elseif fib.offerType == "143">
176 <#assign productURL = "business-real-rewards">
177 <#assign productName = "Business Real Rewards Card" >
178 <#elseif fib.offerType == "121">
179 <#assign productURL = "business-platinum2103">
180 <#assign productName = "Business Card" >
181 <#elseif fib.offerType == "138">
182 <#assign productURL = "travel-rewards-plus">
183 <#assign productName = "Travel Rewards+" >
184 <#elseif fib.offerType == "154">
185 <#assign productURL = "reserve-rewards-plus">
186 <#assign productName = "Reserve Rewards+" >
187 </#if>
188 </#if>
189 <#assign fibEmpOfferId = "">
190 <#if fib?has_content>
191 <#assign fibEmpOfferId = fib.empofferId!"">
192 </#if>
193 <!-- if an employee don't show business cards -->
194 <#if ((isEmployee == true && ( consumerOfferTypes?seq_contains(fib.offerType) == true)) || isEmployee == false) >
195 <#if url?matches(".*/${productURL}.*")>
196 <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" selected="selected">${productName}</option>
197 <#else>
198 <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">${productName}</option>
199 </#if>
200 </#if>
201 </#list>
202 </select>
203 <nav class="styled-select__dropdown">
204 <div class="back-overview hide-mobile">
205 <a href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a>
206 </div>
207 <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false" >
208 <span class="selected-option"></span>
209 <div class="jn-arrow arrow arrow-right"></div>
210 </a>
211 <button href="javascript:void(0)" class="jn-hamburger hamburger" aria-expanded="false" aria-label="open navigation menu">
212 <div class="first-line transform transformed1"></div>
213 <div></div>
214 <div class="transform transformed2"></div>
215 <div></div>
216 </button>
217 <ul>
218 <#list fiCardsData as fib>
219 <#if ameriprise>
220 <#if (fib.offerType=="101")>
221 <#assign productURL="premier-visa-signature">
222 <#assign productName="Ameriprise Premier Visa Signature">
223 <#elseif (fib.offerType=="103")>
224 <#assign productURL = "visa-signature">
225 <#assign productName = "Ameriprise Visa Signature">
226 </#if>
227 <#else>
228 <#if (fib.offerType=="108" || fib.offerType=="109")>
229 <#assign productURL="consumer-platinum2103">
230 <#assign productName="Platinum Card">
231 <#elseif fib.offerType=="147">
232 <#assign productURL = "max-cash-secured">
233 <#assign productName = "Max Cash Secured Card" >
234 <#elseif (fib.offerType=="104")>
235 <#assign productURL = "max-cash">
236 <#assign productName = "Max Cash Preferred Card">
237 <#elseif (fib.offerType=="101" || fib.offerType=="103")>
238 <#assign productURL = "consumer-edr2112">
239 <#assign productName = "Everyday Rewards+">
240 <#elseif fib.offerType == "115">
241 <#assign productURL = "secured">
242 <#assign productName = "Secured Card" >
243 <#elseif fib.offerType == "141">
244 <#assign productURL = "college-real-rewards">
245 <#assign productName = "College Real Rewards" >
246 <#elseif fib.offerType == "144">
247 <#assign productURL = "smart-business-rewards">
248 <#assign productName = "Smart Business Rewards Card" >
249 <#elseif fib.offerType == "128">
250 <#assign productURL = "business-cash-preferred">
251 <#assign productName = "Business Cash Preferred" >
252 <#elseif fib.offerType == "143">
253 <#assign productURL = "business-real-rewards">
254 <#assign productName = "Business Real Rewards Card" >
255 <#elseif fib.offerType == "121">
256 <#assign productURL = "business-platinum2103">
257 <#assign productName = "Business Card" >
258 <#elseif fib.offerType == "138">
259 <#assign productURL = "travel-rewards-plus">
260 <#assign productName = "Travel Rewards+" >
261 <#elseif fib.offerType == "154">
262 <#assign productURL = "reserve-rewards-plus">
263 <#assign productName = "Reserve Rewards+" >
264 </#if>
265 </#if>
266 <!-- if an employee don't show business cards -->
267 <#if ((isEmployee == true && ( consumerOfferTypes?seq_contains(fib.offerType) == true)) || isEmployee == false) >
268 <#if url?matches(".*/${productURL}.*")>
269 <#if (fib.offerType=="104" && url?contains("max-cash-secured"))>
270 <#-- prevent from max cash overiding max cash secured. -->
271 <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li>
272 <#else>
273 <li class="selected" data-value="${productName}"><a href="javascript:void(0)">${productName}</a></li>
274 </#if>
275 <#else>
276 <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li>
277 </#if>
278 </#if>
279 </#list>
280 </ul>
281 </nav>
282
283 </div>
284 </header>
285 </div>
286 <script>
287 var page = location.pathname.split('/')[location.pathname.split('/').length-1];
288 var partnerName = "${partnerName!0}";
289 var metaDesc = "";
290 switch (page) {
291 case "consumer-platinum2103":
292 document.title = "The purchasing power of Zero | "+partnerName+" Platinum Card";
293 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 20 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card.";
294 break;
295 case "max-cash-secured":
296 document.title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card";
297 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
298 break;
299 case "max-cash":
300 document.title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card";
301 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select";
302 break;
303 case "real-rewards":
304 document.title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+";
305 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase.";
306 break;
307 case "secured":
308 document.title = "Strengthen your finances | "+partnerName+" Secured Card";
309 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
310 break;
311 case "college-real-rewards":
312 document.title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards";
313 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
314 break;
315 case "smart-business-rewards":
316 document.title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card";
317 metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business. Earn a $200 Bonus and 2x Rewards on your top 2 spend categories each month with the "+partnerName+" Credit Card.";
318 break;
319 case "business-cashback":
320 document.title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred";
321 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses.";
322 break;
323 case "business-real-rewards":
324 document.title = "Earn up to 1.5X points with no caps | "+partnerName+" Business Real Rewards Card";
325 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ;
326 break;
327 case "business-platinum2103":
328 document.title = "Pay down your other credit card balances faster | "+partnerName+" Business Card";
329 metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles";
330 break;
331 case "premier-visa-signature":
332 document.title = "Exclusively for Ameriprise clients | Ameriprise® Premier Visa Signature® Card";
333 metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $375 cash value when deposited into an eligible account after spending $3,000 in eligible net purchases within the first 90 days of account opening.";
334 break;
335 case "visa-signature":
336 document.title = "Exclusively for Ameriprise clients | Ameriprise® Visa Signature® Card";
337 metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $250 cash value when deposited into an eligible Ameriprise account after spending $2,000 in eligible net purchases within the first 90 days of account opening.";
338 break;
339 case "travel-rewards-plus":
340 document.title = partnerName + " | Travel Rewards+ Card";
341 metaDesc = "Make travel more rewarding with unlimited 4x points on travel and frequent popular categories.";
342 break;
343 case "reserve-rewards-plus":
344 document.title = partnerName + " | Reserve Rewards+ Card";
345 metaDesc = "Get exceptional rewards on travel and frequent purchases with this exclusive metal card.";
346 break;
347 }
348 if('${isEmployee?string("yes", "no")}' == "yes") {
349 switch (page) {
350 case "max-cash":
351 document.title = "Earn a $200 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card";
352 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $200 Bonus and 5% cash back on the two categories you select";
353 break;
354 }
355 }
356
357 if (metaDesc.length > 0) {
358 var m = document.createElement('meta');
359 m.name = 'description';
360 m.content = metaDesc;
361 document.head.appendChild(m);
362 }
363 function toggleFlyOutMenu() {
364 $('.styled-select').toggleClass('show-select');
365 var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded');
366 if(ariaExpanded !== null) {
367 var isAriaExpanded;
368 if(ariaExpanded === "true") {
369 isAriaExpanded = true;
370 $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'open navigation menu');
371 } else {
372 isAriaExpanded = false
373 $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'close navigation menu');
374
375 }
376 $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded);
377 $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded);
378
379 }
380 }
381 AUI().ready(function () {
382 var pageSelected = $('.selected').attr('data-value');
383 $('.jn-hamburger, .dropdown-select').click(function () {
384 toggleFlyOutMenu();
385 });
386 $('.styled-select__dropdown').keydown(function(event) {
387 var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first();
388 var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last();
389
390 if(event.keyCode === 9 ) {
391 // if they tab outside of the nav close the navigation
392 //shift + tab pressed
393 if(event.shiftKey && firstNavigationLink.is(document.activeElement)) {
394 toggleFlyOutMenu();
395 } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) {
396 toggleFlyOutMenu();
397 }
398 }
399 });
400 $('.selected-option').text(pageSelected);
401 });
402 </script>
403
404 <#else>
405 <script>
406 console.log("FI Cards Data empty");
407 location.href = '${url404}';
408 </script>
409 </#if>
410 <#else>
411 <script>
412 console.log("FI opt out");
413 location.href = '${url404}';
414 </script>
415 </#if>
416<#else>
417 <script>
418 console.log("location code empty");
419 location.href = '${url404}';
420 </script>
421</#if>
Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing: ==> bCode [in template "10153#10191#6991552" at line 86, column 6] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #if bCode?starts_with("amp") && (url?... [in template "10153#10191#6991552" at line 86, column 1] ----
1<#assign url = themeDisplay.getURLCurrent() >
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4<#assign url404 = '/error/404.html' >
5<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
6<#assign environment = url?replace('/12t1.*','','r')>
7<#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' >
8<#assign prcaURL = propsUtil.get('elan.prca.url')>
9<#assign useprcaValue = "" >
10<#assign applicationType = "saa" >
11<#assign projectIds = ["12", "13", "14", "15", "16"]>
12
13<#if oadURL?contains("uat-")>
14 <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' >
15<#else>
16 <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' >
17</#if>
18<#-- check bankercode validity -->
19
20<#if qstringmap["bankercode"]?has_content>
21 <#assign bCode= qstringmap["bankercode"]?first>
22 <#assign bCode= htmlUtil.escapeJS(bCode)>
23 <#assign bCode= htmlUtil.escape(bCode)>
24 <#assign isEmployee = false>
25
26 <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bCode)>
27 <#if fiData?first?has_content>
28 <#assign fi = fiData?first>
29 <#if projectIds?seq_index_of(fi.projectId) != -1>
30 <#assign subbu_special = fi.offerId>
31 </#if>
32 <#if fi.projectType == "emp">
33 <#assign isEmployee = true>
34 </#if>
35 <#else>
36 <script>
37 console.log("fiData missing");
38 location.href = '${url404}';
39 </script>
40 </#if>
41 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)>
42 <#if !bData?first?has_content>
43 <script>
44 console.log("bData missing");
45 location.href = '${url404}';
46 </script>
47 </#if>
48 <#list bData as b>
49 <#assign lc = b.locationcode >
50 <#assign bName = b.branch >
51 <#assign bPhone = b.businessphone >
52 <#assign boeid = b.oeid?trim>
53 <#assign fName = b.firstname?trim>
54 <#assign lName = b.lastname?trim>
55 <#assign rlc = b.reallocationcode >
56 <#assign mappedLC = b.mappedLocationCode >
57 </#list>
58
59<#else>
60 <script>
61 console.log("MainProductBcode missing");
62 location.href = '${url404}';
63 </script>
64</#if>
65
66<#assign text_to_apply_source = "vanity url" >
67<#if qstringmap["sms"]?has_content>
68 <#assign sms = 1 >
69 <#assign text_to_apply_source = "sms" >
70</#if>
71<#if qstringmap["qrCode"]?has_content>
72 <#assign text_to_apply_source = "qr code" >
73</#if>
74<#assign campaignId = "" >
75<#assign ecidExt="">
76<#if qstringmap["ecid"]?has_content>
77 <#assign campaignId = qstringmap["ecid"]?first >
78 <#assign campaignId = htmlUtil.escape(campaignId)>
79 <#assign campaignId = htmlUtil.escapeJS(campaignId)>
80
81 <#assign ecidExt = qstringmap["ecid"]?first>
82 <#assign ecidExt = htmlUtil.escape(ecidExt)>
83 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
84 <#assign ecidExt = "&ecid=" + ecidExt>
85</#if>
86<#if bCode?starts_with("amp") && (url?contains("11t1m"))>
87 <#assign ameriprise = true>
88<#else>
89 <#assign ameriprise = false>
90</#if>
91
92<#if mappedLC?has_content && !ameriprise>
93 <#assign lc = mappedLC >
94</#if>
95
96
97
98<#if lc?has_content>
99
100 <#assign firstNameLength = fName?length >
101 <#assign lastNameLength = lName?length >
102 <#if firstNameLength + lastNameLength > 19 >
103 <#if lastNameLength > 18 >
104 <#assign bLName = lName?substring(0,18)>
105 <#else>
106 <#assign bLName = lName>
107 </#if>
108 <#assign maxFirstName = 19 - bLName?length >
109 <#if firstNameLength > maxFirstName >
110 <#assign bFName = fName?substring(0,maxFirstName)>
111 <#else>
112 <#assign bFName = fName>
113 </#if>
114 <#else>
115 <#assign bFName = fName >
116 <#assign bLName = lName >
117 </#if>
118
119
120 <#assign prefix = "00000" >
121 <#assign lcWithPrefix = prefix + lc >
122 <#assign withPrefixLength = lcWithPrefix?length >
123 <#assign startHere = withPrefixLength - 5>
124 <#assign lc = lcWithPrefix?substring(startHere)>
125
126 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
127 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
128
129 <#if clientProfileList?first?has_content>
130 <#assign clientProfile = clientProfileList?first>
131 <#assign partnerName = clientProfile.getMarketingNameLong()>
132 <#assign pbu = clientProfile.getPbu()>
133 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
134 <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)>
135 <#if (optoutData?size == 0)>
136 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! />
137 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
138 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
139 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
140 <#assign partnerUrl = 'https://' + partnerUrl>
141 </#if>
142 <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case>
143 <#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!>
144
145 <#if pbu == "0864054">
146 <#assign override = "berkshire">
147 <#else>
148 <#assign override = " ">
149 </#if>
150
151 <#-- this one should be delete for prod -->
152
153 <#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!>
154 <#assign pageClass = secondaryBackgroundImage.cardType.getData()>
155
156 <#if (subbu_special?has_content)>
157 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
158 <#else>
159 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
160 </#if>
161
162
163 <#assign temp = []>
164 <#assign offerTypeList = []>
165 <#assign index = 0>
166 <#list fiCardsData as fib>
167 <#if !(offerTypeList?seq_contains(fib.offerType))>
168 <#assign offerTypeList = offerTypeList + [fib.offerType]>
169 <#assign temp = temp + fiCardsData[index..index]>
170 </#if>
171 <#assign index = index + 1>
172 </#list>
173 <#assign fiCardsData = temp>
174 <#if (fiCardsData?size > 0)>
175 <#if (subbu_special?has_content)>
176 <#assign lc_used = fiCardsData?first.WebLocationCode>
177 <#else>
178 <#if ameriprise>
179 <#assign lc_used = mappedLC>
180 <#else>
181 <#assign lc_used = lc>
182 </#if>
183 </#if>
184 <#assign productURL = "">
185 <#list fiCardsData as fib>
186 <#assign useprcaValue = fib.useprca!"">
187 <#if ameriprise>
188 <#if (fib.offerType=="101")>
189 <#assign productURL="premier-visa-signature">
190 <#assign productName="Premier Visa Signature">
191 <#assign productClass="ameriprise-premier-visa-signature">
192 <#elseif (fib.offerType=="103")>
193 <#assign productURL = "visa-signature">
194 <#assign productName = "Visa Signature">
195 <#assign productClass="ameriprise-visa-signature">
196 </#if>
197 <#else>
198 <#if (fib.offerType=="108" || fib.offerType=="109")>
199 <#assign productURL="consumer-platinum2103">
200 <#assign productName="Platinum">
201 <#elseif (fib.offerType=="104")>
202 <#assign productURL = "max-cash">
203 <#assign productName="Max Cash Preferred">
204 <#elseif (fib.offerType=="101" || fib.offerType=="103")>
205 <#assign productURL = "consumer-edr2112">
206 <#assign productName="Everyday Rewards+">
207 <#elseif fib.offerType == "115">
208 <#assign productURL = "secured">
209 <#assign productName="Secured">
210 <#elseif fib.offerType == "141">
211 <#assign productURL = "college-real-rewards">
212 <#assign productName="College Real Rewards">
213 <#elseif fib.offerType == "144">
214 <#assign productURL = "smart-business-rewards">
215 <#assign productName="Smart Business Rewards">
216 <#elseif fib.offerType == "147">
217 <#assign productURL = "max-cash-secured">
218 <#assign productName="Max Cash Secured">
219 <#elseif fib.offerType == "128">
220 <#assign productURL = "business-cash-preferred">
221 <#assign productName="Business Cash Preferred">
222 <#elseif fib.offerType == "143">
223 <#assign productURL = "business-real-rewards">
224 <#assign productName="Business Real Rewards">
225 <#elseif fib.offerType == "121">
226 <#assign productURL = "business-platinum2103">
227 <#assign productName="Business">
228 <#elseif fib.offerType == "138">
229 <#assign productURL = "travel-rewards-plus">
230 <#assign productName = "Travel Rewards+" >
231 <#elseif fib.offerType == "154">
232 <#assign productURL = "reserve-rewards-plus">
233 <#assign productName = "Reserve Rewards+" >
234 </#if>
235 </#if>
236
237 <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">
238 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">
239 <#assign newSourceCode = fib.sourceCode>
240 <#assign newOfferId = fib.saaofferId>
241
242 <#assign empOfferId = "">
243 <#if fib?has_content>
244 <#assign empOfferId = fib.empofferId!"">
245 </#if>
246 <#assign marketingChannel = 'SAT2A'>
247 <#if isEmployee>
248 <#assign marketingChannel = 'EMPL'>
249 <#assign newOfferId = empOfferId>
250 </#if>
251
252 <#if url?matches(".*/${productURL}\\?.*")>
253 <#assign APR="">
254 <#assign AMF="">
255 <#assign BAL="">
256 <#assign sdata = utilServ.makeCall('crcDDCGetSchumerBox', newOfferId + '&' + newSourceCode)>
257 <#if (sdata?size > 0)>
258 <#list sdata as sItem>
259
260 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
261 <#assign APR = sItem.scrapedValue>
262 <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) >
263 <#assign AMF = sItem.scrapedValue>
264 <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) >
265 <#assign BAL = sItem.scrapedValue>
266 </#if>
267 <#if (APR?has_content && AMF?has_content && BAL?has_content)>
268 <#break>
269 </#if>
270 </#list>
271 <#else>
272 <script>
273 console.log('no scraped data');
274 </script>
275 </#if>
276 <#if ((fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "121" ) && !ameriprise)>
277 <#if (sdata?size > 0)>
278 <#assign apr_string = "">
279 <#list sdata as d>
280 <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))>
281 <#assign apr_string = d.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
282 <#break>
283 </#if>
284 </#list>
285 <script>
286 $(document).ready(function () {
287 var aprText = "${apr_string}";
288 if (aprText) {
289 var matches= aprText.match(/\d+(\.\d+)?%?/g);
290 var billing_cycle = "";
291 var apr_min = "";
292 var apr_max = "";
293 var apr_max_formatted = "";
294 if (aprText.indexOf("Platinum:") != -1 || aprText.indexOf("Business:") != -1) {
295 billing_cycle = matches[1];
296 apr_min = matches[2];
297 apr_max = matches[3];
298 if (apr_max){
299 apr_max_formatted = '-' + apr_max;
300 }
301 }
302
303 if (billing_cycle) {
304 $(".scraped-billing-cycle").html(billing_cycle);
305 }
306 if (apr_min) {
307 $(".scraped-apr-min").html(apr_min);
308 }
309 $('.scraped-apr-max-formatted').html(apr_max_formatted);
310 if (apr_max) {
311 $('.scraped-apr-max').html(apr_max);
312 }
313
314 }
315 });
316 </script>
317 </#if>
318 </#if>
319 <#if ameriprise>
320 <#assign card_art_alt = partnerName + " " + productName + " " + " Card">
321 <#assign rollover_text = partnerName + " " + productName + " " + " Card">
322 <#else>
323 <#assign card_art_alt = partnerName + " " + productName + " " + " Card">
324 <#assign rollover_text = partnerName + " " + productName + " " + " Credit Card">
325 <#assign card_text = productName + " Card">
326 </#if>
327
328 <div class="hero-container ${pageClass} ${productClass!''}" title="${rollover_text!''}">
329 <div class="hero-main">
330
331 <div class="hero-main-container">
332 <div class="hero-main-offer">
333 <div class="offer-detail">
334 <div class="offer-detail-cardArt cardArtImg">
335 <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
336 <p>${card_text!''}</p>
337 <#if fib.offerType=="108" || fib.offerType=="109">
338 <a href="javascript:void(0);" data-micromodal-trigger="modal-2">See how much you could save with a balance transfer</a>
339 </#if>
340 </div>
341 <div class="offer-detail-text text-color-default hide-desktop">
342 ${primaryHeadlineFeatureTop.getData()}
343 ${primaryHeadlineFeatureBottom.getData()}
344 </div>
345 <#if (useprcaValue == "1")>
346 <form class="form1 hide-desktop" action='${prcaURL}?locationCode=${lc_used}&offerId=${newOfferId}&preparerType=customer&mktChl=${marketingChannel}&applicationType=${applicationType}' method="post" id="BAAForm">
347 <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label>
348 <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea>
349 <button
350 type="submit"
351 id="oadSecButton-top"
352 data-button-name="cta-button-top"
353 class="applyNowLink jn-button apply-button button-bg-color-custom"
354 disabled
355 >
356 ${ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span>
357 </button>
358 </form>
359 <#else>
360 <form class="form1 hide-desktop" action='${oadURL}?locationCode=${lc_used}&offerId=${newOfferId}&preparerType=customer&mktChl=${marketingChannel}' method="post" id="BAAForm">
361 <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label>
362 <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea>
363 <button
364 type="submit"
365 id="oadSecButton-top"
366 data-button-name="cta-button-top"
367 class="applyNowLink jn-button apply-button button-bg-color-custom"
368 disabled
369 >
370 ${ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span>
371 </button>
372 </form>
373 </#if>
374 </div>
375 <div class="offer-header">
376 <div class="offer-text-top">
377 <div class="offer-title">
378 ${primaryHeadlineText.getData()}
379 </div>
380 <h1 class="offer-subtitle">
381 <#if isEmployee && employeePrimaryHeadlineFeature.getData()?has_content>
382 ${employeePrimaryHeadlineFeature.getData()}
383 <#else>
384 ${primaryHeadlineFeature.getData()}
385 </#if>
386 </h1>
387 </div>
388 <div class="offer-text-bottom hide-mobile">
389 <div class="offer-detail-text text-color-default ">
390 ${primaryHeadlineFeatureTop.getData()}
391 ${primaryHeadlineFeatureBottom.getData()}
392 <#-- allow for all except these url -->
393 <#if (fib.offerType == "108" ||
394 fib.offerType == "109" ||
395 fib.offerType == "121" ||
396 fib.offerType == "144"
397 )>
398 <br>
399 <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" class="text-color-default" target="_blank">
400 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>See terms & conditions</a>
401 </#if>
402 </div>
403 <a tabindex="0" id="oadSecButton-top" data-button-name="cta-button-bottom" class="applyNowLink jn-button banner-cta-apply-button">${optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span></a>
404
405 </div>
406 </div>
407
408 </div>
409 </div>
410 </div>
411 <div class="hero-primary-benefits">
412 <#if secondaryFeatureText.getData() != "">
413 <#assign featureCounter = 0>
414 <#list secondaryFeatureText.getSiblings() as item>
415 <div class="primary-benefit">
416 <div class="primary-benefit-wrapper text-color-white">
417 ${item.getData()}
418 <#if (fib.offerType=="108" || fib.offerType=="109") && (featureCounter == secondaryFeatureText.getSiblings()?size - 1)>
419 <a
420 href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
421 class="text-color-default"
422 target="_blank"
423 >
424 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>
425 Terms & Conditions
426 </a>
427 </#if>
428 </div>
429 </div>
430 <#assign featureCounter = featureCounter + 1>
431 </#list>
432 </#if>
433 </div>
434 </div>
435 <div class="standard-content-container" title="${rollover_text!''}">
436 <div class="product-details-container">
437 <div class="detail-background">
438 <h2>${secondaryHeadlineText.getData()}</h2>
439 <div class="secondary-benefits">
440 <div class="option">
441 ${additionalInfoGroupA.getData()}
442 <#if pbu != "0892445">
443 <div>
444 <#assign col1AmfOfferTypes = ["101", "141", "138", "154", "128"] >
445 <#assign col1AprOfferTypes = ["104", "121", "143", "144"] >
446 <#if col1AmfOfferTypes?seq_contains(fib.offerType)>
447 <#if (fib.offerType == "101")>
448 <h3>Annual Fee<sup>*</sup></h3>
449 <#else>
450 <h3>Annual Fee</h3>
451 </#if>
452 <p>${AMF!''}
453 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
454 class="text-color-default" target="_blank">
455 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
456 </a>
457 </p>
458 <#elseif col1AprOfferTypes?seq_contains(fib.offerType)>
459 <#if (fib.offerType == "104") >
460 <h3 >APR for Purchases:</h3>
461 <#elseif (fib.offerType == "144")>
462 <h3>APR for Purchases and Balance Transfers:</h3>
463 <#else>
464 <h3>Intro APR<sup>*</sup> for Purchases:</h3>
465 </#if>
466 <p>${APR!''}
467 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
468 class="text-color-default" target="_blank">
469 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
470 </a>
471 </p>
472
473 </#if>
474 </div>
475 </#if>
476 </div>
477 <div class="option">
478 ${additionalInfoGroupB.getData()}
479 <#if pbu != "0892445">
480 <div>
481 <#assign col2AmfOfferTypes = ["108", "109", "115", "144"] >
482 <#assign col2AprOfferTypes = ["138", "154", "128"] >
483 <#assign col2BalOfferTypes = ["101", "104", "141", "121", "143"] >
484 <#if col2AmfOfferTypes?seq_contains(fib.offerType)>
485 <h3>Annual Fee</h3>
486 <p>${AMF!''}
487 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
488 class="text-color-default" target="_blank">
489 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
490 </a>
491 </p>
492 <#elseif col2AprOfferTypes?seq_contains(fib.offerType)>
493 <#if (fib.offerType == "128")>
494 <h3>Intro APR<sup>*</sup> for Purchases:</h3>
495 <#else>
496 <h3>APR for Purchases:</h3>
497 </#if>
498 <p>${APR!''}
499 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
500 class="text-color-default" target="_blank">
501 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
502 </a>
503 </p>
504 <#elseif col2BalOfferTypes?seq_contains(fib.offerType)>
505 <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3>
506 <p>${BAL!''}
507 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
508 class="text-color-default" target="_blank">
509 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
510 </a>
511 </p>
512
513 </#if>
514 </div>
515 </#if>
516 </div>
517 <#if additionalInfoGroupC?has_content || (isEmployee && employeeAdditionalInfoGroupC.getData()?has_content)>
518 <div class="option">
519 <#if isEmployee && employeeAdditionalInfoGroupC.getData()?has_content>
520 ${employeeAdditionalInfoGroupC.getData()}
521 <#else>
522 ${additionalInfoGroupC.getData()}
523 </#if>
524 <div>
525 <#assign col3AmfOfferTypes = ["104", "121", "143"] >
526 <#assign col3AprOfferTypes = ["101", "108", "109", "141", "147", "115"] >
527 <#assign col3BalOfferTypes = ["138", "154", "128"] >
528 <#if col3AmfOfferTypes?seq_contains(fib.offerType)>
529 <#if (fib.offerType == "104")>
530 <h3>Annual Fee<sup>*</sup></h3>
531 <#else>
532 <h3>Annual Fee</h3>
533 </#if>
534 <p>${AMF!''}
535 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
536 class="text-color-default" target="_blank">
537 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
538 </a>
539 </p>
540 <#elseif col3AprOfferTypes?seq_contains(fib.offerType)>
541 <#if (fib.offerType == "115" || fib.offerType == "147")>
542 <h3>APR for Purchases and Balance Transfers:</h3>
543 <#else>
544 <h3>Intro APR<sup>*</sup> for Purchases:</h3>
545 </#if>
546 <p>${APR!''}
547 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
548 class="text-color-default" target="_blank">
549 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
550 </a>
551 </p>
552 <#elseif col3BalOfferTypes?seq_contains(fib.offerType)>
553 <#if (fib.offerType == "128")>
554 <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3>
555 <#else>
556 <h3>APR for Balance Transfers:</h3>
557 </#if>
558 <p>${BAL!''}
559 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
560 class="text-color-default" target="_blank">
561 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
562 </a>
563 </p>
564
565 </#if>
566 <#if (fib.offerType == "147")>
567 <h3>Annual Fee<sup>*</sup></h3>
568 <p>${AMF!''}
569 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
570 class="text-color-default" target="_blank">
571 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
572 </a>
573 </p>
574 </#if>
575 <#if (fib.offerType == "108" || fib.offerType == "109")>
576 <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3>
577 <p>${BAL!''}
578 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
579 class="text-color-default" target="_blank">
580 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
581 </a>
582 </p>
583 </#if>
584 </div>
585 </div>
586 </#if>
587 </div>
588 </div>
589 </div>
590 </div>
591 <div class="banner-wrapper" title="${rollover_text!''}">
592 <div class="banner ${override}">
593 <div class="banner-cardArt cardArtImg">
594 <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
595 </div>
596 <div class="banner-cta">
597 <div class="banner-cta-text text-color-white text-bold">
598 <#if isEmployee && employeeOptionalCtaFeatureText.getData()?has_content>
599 ${employeeOptionalCtaFeatureText.getData()}
600 <#else>
601 ${optionalCtaFeatureText.getData()}
602 </#if>
603 </div>
604 <a
605 tabindex="0"
606 id="oadSecButton"
607 data-button-name="cta-button-bottom"
608 class="applyNowLink jn-button banner-cta-apply-button button-bg-color-custom text-color-white"
609 >
610 ${optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card</span></a>
611 </div>
612 </div>
613 </div>
614 <#break />
615 </#if>
616 </#list>
617
618 <script>
619 var reportingData = window.reportingData || {};
620 document.addEventListener('DOMContentLoaded', function() {
621 var page = location.pathname.split('/')[location.pathname.split('/').length-1];
622 var hostName = location.hostname;
623
624 function getDomainFromHostname(hostname) {
625 var parts = hostname.split('.');
626 return parts.length === 3 ? parts[1] : parts[0];
627 }
628 var domain = getDomainFromHostname(hostName);
629 var partnerName = "${partnerName!''}";
630
631 var ameriprise = '${ameriprise?string("yes", "no")}';
632 var locationCode = "${rlc!lc}";
633 var eidAmp = "";
634 if (ameriprise == "yes") {
635 var bankercode_amp = '${bCode}';
636 eidAmp = bankercode_amp.substring(3);
637 locationCode ="";
638 }
639
640 var heroCardImgs = document.querySelectorAll('.cardArtImg img');
641 for (var index = 0; index < heroCardImgs.length; index++) {
642 var heroCardImg = heroCardImgs[index];
643 var heroCardSrc = heroCardImg.getAttribute("src");
644 if(heroCardSrc != "") {
645 resizeImg(heroCardImg);
646 }
647 }
648 function resizeImg(img) {
649 img.addEventListener("load", function() {
650 var cardImgWidth = img.width;
651 var cardImgHeight = img.height;
652 if(cardImgWidth > cardImgHeight) {
653 img.style.width = "285px";
654 } else {
655 img.style.width = "150px";
656 }
657 });
658 }
659
660
661 $('.jn-button').removeAttr('disabled');
662 $('.jn-button').removeClass('jn-disabled');
663 jQuery('#oadSecButton, #oadSecButton-top').on('click', function(e) {
664 jQuery('#BAAForm').submit();
665 });
666
667 jQuery('#BAAForm').on('submit', function(e){
668 e.preventDefault();
669 var xmlData;
670 if(ameriprise == "yes") {
671 xmlData = '<?xml version="1.0"?>'+
672 "<prefillData>"+
673 "<versionNumber>1.0</versionNumber>"+
674 "<applicationData>"+
675 "<referral>" +
676 "<employeeId>" + eidAmp + "</employeeId>" +
677 "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+
678 "<divisionNumber></divisionNumber>"+
679 "</referral>" +
680 "<bankerInformation>"+
681 "<locationCode>" + locationCode + "</locationCode>"+
682 "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+
683 "<employeeID>${boeid!0}</employeeID>"+
684 "<name>" +
685 "<first>${bFName!'0'}</first>" +
686 "<last>${bLName!'0'}</last>" +
687 "</name>"+
688 "<phone>"+
689 "<areaCode>"+areaCode+"</areaCode>"+
690 "<exchange>"+exchangeCode+"</exchange>"+
691 "<number>"+num+"</number>"+
692 "</phone>"+
693 "</bankerInformation>"+
694 "</applicationData>"+
695 "</prefillData>"
696 } else if ('${isEmployee?string("yes", "no")}' == "yes") {
697 xmlData = '<?xml version="1.0"?>'+
698 "<prefillData>"+
699 "<versionNumber>1.0</versionNumber>"+
700 "<applicationData>"+
701 "<bankerInformation>"+
702 "<employeeFullName>Employee Product</employeeFullName>"+
703 "<employeeId>EMPPROD</employeeId>"+
704 "<employeePhoneNumber></employeePhoneNumber>"+
705 "<locationCode>" + locationCode + "</locationCode>"+
706 "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+
707 "<originatingBranchId></originatingBranchId>"+
708 "<name>" +
709 "<first>${bFName!'0'}</first>" +
710 "<last>${bLName!'0'}</last>" +
711 "</name>"+
712 "<phone>"+
713 "<areaCode>" + areaCode + "</areaCode>"+
714 "<exchange>" + exchangeCode + "</exchange>"+
715 "<number>" + num + "</number>"+
716 "</phone>"+
717 "</bankerInformation>"+
718 "<referral>" +
719 "<divisionNumber></divisionNumber>" +
720 "<partnerLocationID>" + locationCode + "</partnerLocationID>" +
721 "<referralId>EMPPROD</referralId>" +
722 "</referral>" +
723 "</applicationData>"+
724 "</prefillData>";
725 } else {
726 xmlData = '<?xml version="1.0"?>'+
727 "<prefillData>"+
728 "<versionNumber>1.0</versionNumber>"+
729 "<applicationData>"+
730 "<bankerInformation>"+
731 "<locationCode>" + locationCode + "</locationCode>"+
732 "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+
733 "<employeeID>${boeid!0}</employeeID>"+
734 "<name>" +
735 "<first>${bFName!'0'}</first>" +
736 "<last>${bLName!'0'}</last>" +
737 "</name>"+
738 "<phone>"+
739 "<areaCode>"+areaCode+"</areaCode>"+
740 "<exchange>"+exchangeCode+"</exchange>"+
741 "<number>"+num+"</number>"+
742 "</phone>"+
743 "</bankerInformation>"+
744 "</applicationData>"+
745 "</prefillData>"
746 }
747 console.log("useprcaValue---->"+${useprcaValue})
748 if('${useprcaValue}' =='1'){
749 if('${isEmployee?string("yes", "no")}' == "yes"){
750 var employeeFullName = "${fName!'0'}" + ' ' + "${lName!'0'}";
751 var firstName = "${fName!'0'}".trim();
752 var lastName = "${lName!'0'}".trim();
753 var fullName = employeeFullName.trim();
754
755 if (fullName.length <= 19) {
756 employeeFullName = fullName;
757 } else if (firstName.charAt(0) + ' ' + lastName.length <= 19) {
758 employeeFullName = firstName.charAt(0) + ' ' + lastName;
759 } else {
760 employeeFullName = firstName.charAt(0) + ' ' + lastName.substring(0, 17);
761 }
762 var applicationJsonData = {
763 "prefillData": {
764 "versionNumber": "1.0",
765 "applicationData": {
766 "bankerInformation": {
767 "locationCode": locationCode,
768 "originatingBranchId": "${bName!'0'}",
769 "employeeId": "EMPPROD",
770 "employeeFullName": "Employee Product",
771 "employeePhoneNumber": phoneNum
772 }
773 }
774 }
775 };
776 }else{
777 var employeeFullName = "${fName!'0'}" + ' ' + "${lName!'0'}";
778 var firstName = "${fName!'0'}".trim();
779 var lastName = "${lName!'0'}".trim();
780 var fullName = employeeFullName.trim();
781
782 if (fullName.length <= 19) {
783 employeeFullName = fullName;
784 } else if (firstName.charAt(0) + ' ' + lastName.length <= 19) {
785 employeeFullName = firstName.charAt(0) + ' ' + lastName;
786 } else {
787 employeeFullName = firstName.charAt(0) + ' ' + lastName.substring(0, 17);
788 }
789
790 var applicationJsonData = {
791 "prefillData": {
792 "versionNumber": "1.0",
793 "applicationData": {
794 "bankerInformation": {
795 "locationCode": locationCode,
796 "originatingBranchId": "${bName!'0'}",
797 "employeeId": "${boeid!0}",
798 "employeeFullName": employeeFullName,
799 "employeePhoneNumber": phoneNum
800 }
801 }
802 }
803 };
804 }
805 var jsonData = JSON.stringify(applicationJsonData);
806 jQuery('#appDataBAA').val(jsonData);
807 }else{
808 jQuery('#appDataBAA').val(xmlData);
809 }
810
811 var buttonName = jQuery('.jn-button').data('button-name');
812 /* SiteCatalyst onClick tracking */
813 reportingData.apply_button = buttonName;
814 AUI().ready(function() {
815 if (window.publisherFW) {
816 window.publisherFW.publishEvent("onClick", reportingData);
817 }
818 });
819
820 var paramString = '${bCode}' + "&" + xmlData + "&" + '${htmlUtil.escapeURL(htmlUtil.escapeJS(url))}';
821 /* CRC service call */
822 Liferay.Service(
823 '/crcutilities.crcremoteservice/make-call',
824 {
825 storedProcedure: 'crcDDCTextApplyLog',
826 parameters: paramString
827 },
828 function(obj)
829 {
830 //console.log("T2A logging call");
831 }
832 );
833
834 this.submit();
835 });
836 var regex = /\d+/g;
837 var bdNumber = "${bPhone!''}";
838 var phoneNum = bdNumber.match(regex);
839 var areaCode = "";
840 var exchangeCode = "";
841 var num = "";
842 if(phoneNum != null) {
843 phoneNum = phoneNum.join("");
844 areaCode = phoneNum.substring(0,3);
845 exchangeCode = phoneNum.substring(3,6);
846 num = phoneNum.substring(6,10);
847 }
848 var product = "";
849 switch(page) {
850 case "consumer-platinum2103":
851 product="Platinum Card"
852 break;
853 case "consumer-edr2112":
854 product="Everyday Rewards+ Card"
855 break;
856 case "secured":
857 product="Secured Card"
858 break;
859 case "business-cash-preferred":
860 product="Business Cash Preferred"
861 break;
862 case "business-real-rewards":
863 product="Business Real Rewards Card"
864 break;
865 case "business-rewards-plus":
866 product="Business Rewards PLUS Card"
867 break;
868 case "premier-visa-signature":
869 product="Premier Visa Signature Card"
870 break;
871 case "business-platinum2103":
872 product="Business Card"
873 break;
874 case "visa-signature":
875 product="Visa Signature Card"
876 break;
877 case "travel-rewards-plus":
878 product="Travel Rewards+ Card"
879 break;
880 case "reserve-rewards-plus":
881 product="Reserve Rewards+ Card"
882 break;
883 case "max-cash":
884 product="Max Cash Preferred Card"
885 break;
886 case "max-cash-secured":
887 product="Max Cash Secured Card"
888 break;
889 case "college-real-rewards":
890 product="College Real Rewards Card"
891 break;
892 case "smart-business-rewards":
893 product="Smart Business Rewards Card"
894 break;
895 default:
896 product = "All Cards";
897 }
898
899 /* update SiteCatalyst data object */
900 reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' ');
901 reportingData.location_code = '${rlc!0}';
902 reportingData.product = product;
903 reportingData.site_section = 'credit cards';
904 reportingData.platform = 'microsite';
905 reportingData.partner_name = "${partnerName}";
906 reportingData.Banker_id = '${boeid}';
907 reportingData.Banker_code = '${bCode}';
908 reportingData.visitor_type = 'prospect';
909 reportingData.text_to_apply_source = '${text_to_apply_source}';
910 reportingData.page_type = 'product';
911 reportingData.campaign_id = '${campaignId}';
912
913 jQuery('.applyNowLink').on('click', function(e){
914 const bankerId = '${boeid}';
915 const employeeId = "";
916 let visitorId = bankerId;
917
918 if('${isEmployee?string("yes", "no")}' == "yes") {
919 visitorId = employeeId;
920 }
921 // get action url of form submit button
922 const href = document.getElementById('BAAForm').action;
923
924 const urlParams = new URLSearchParams(href);
925 let offerId = "";
926
927 if(urlParams.has('offerid')) {
928 offerId = urlParams.get('offerid');
929 }
930
931 if(urlParams.has('offerId')) {
932 offerId = urlParams.get('offerId');
933 }
934
935 window.dataLayer.push({
936 'event' : 'apply_payload',
937 'location_code': locationCode,
938 'banker_code': '${bCode}',
939 'offer_id': offerId,
940 'visitor_id': visitorId,
941 });
942 return false;
943 });
944 });
945 </script>
946
947 <#else>
948 <script>
949 console.log("FI Cards Data empty");
950 location.href = '${url404}';
951 </script>
952 </#if>
953 <#else>
954 <script>
955 console.log("Fi opt-out");
956 location.href = '${url404}';
957 </script>
958 </#if>
959 <#else>
960 <script>
961 console.log("client profile empty");
962 location.href = '${url404}';
963 </script>
964 </#if>
965
966</#if>
967<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')>
968<#if (clientdata?size > 0)>
969 <#assign backgroundColor = clientdata[0].backgroundHexColor>
970</#if>
971<script>
972 // Makes the Header subtitle work if there is two lines of text
973 var consumerHeader = document.getElementsByClassName("consumer-card")[0];
974 if(consumerHeader){
975 var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0];
976 const offerTextTop = consumerHeader.querySelector(".offer-text-top");
977 const gradientHeight = Math.max(offerTextTop.offsetHeight + 50, 200) + "px";
978 var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle")[0];
979 const consumerSubtitle = consumerOfferHeader.getElementsByTagName("p")[0];
980 if (consumerSubtitle.innerText.length >= 76){
981 //two lines
982 consumerHeroContainer.style.background = "linear-gradient(180deg, ${backgroundColor!'#173989'} " + gradientHeight + ", #f8f8f8 " + gradientHeight + ")";
983 }
984 }
985
986 var buisnessHeader = document.getElementsByClassName("business-card")[0];
987 if(buisnessHeader) {
988 var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0];
989 var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0];
990
991 if(buisnessOfferHeader.innerText.length >= 31 && buisnessOfferHeader.innerText.length < 48){
992 //not two lines but the header on tablet gose outside of allocated space.
993 buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 40%, ${backgroundColor!'#173989'} 40%)";
994 } else if (buisnessOfferHeader.innerText.length >= 48){
995 //two lines
996 buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)";
997 }
998 }
999</script>
Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing: ==> url404 [in template "10153#10191#7958267" at line 37, column 30] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${url404} [in template "10153#10191#7958267" at line 37, column 28] ----
1<#assign url = themeDisplay.getURLCurrent() >
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
4
5<#if qstringmap["bankercode"]?has_content>
6 <#assign bankercode = qstringmap["bankercode"]?first>
7 <#assign bankercode = htmlUtil.escape(bankercode)>
8 <#assign bankercode = htmlUtil.escapeJS(bankercode)>
9 <#assign bankercode = htmlUtil.escapeURL(bankercode)>
10
11 <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bankercode)>
12 <#if fiData?first?has_content>
13 <#assign fi = fiData?first>
14 <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))>
15 <#assign subbu_special = fi.offerId>
16 </#if>
17 </#if>
18
19 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bankercode)>
20 <#list bData as b>
21 <#assign rLC = b.reallocationcode >
22 <#assign lc = b.locationcode >
23 <#assign mappedLC = b.mappedLocationCode >
24 </#list>
25
26 <#assign isEmployee = false>
27
28 <#if fiData?first?has_content>
29 <#assign fi = fiData?first>
30 <#if fi.projectType == "emp">
31 <#assign isEmployee = true>
32 </#if>
33 </#if>
34<#else>
35 <script>
36 console.log("MainProductBcode missing");
37 //location.href = '${url404}';
38 </script>
39</#if>
40
41<#if bankercode?starts_with("amp") && (url?contains("11t1m"))>
42 <#assign ameriprise = true>
43<#else>
44 <#assign ameriprise = false>
45</#if>
46
47<#if mappedLC?has_content && !ameriprise>
48 <#assign lc = mappedLC >
49</#if>
50
51
52<#if lc?has_content>
53 <#assign prefix = "00000" >
54 <#assign lcWithPrefix = prefix + lc >
55 <#assign withPrefixLength = lcWithPrefix?length >
56 <#assign startHere = withPrefixLength - 5>
57 <#assign lc = lcWithPrefix?substring(startHere)>
58 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
59 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
60
61 <#assign clientProfile = clientProfileList?first>
62 <#assign partnerName=clientProfile.getMarketingNameLong()>
63 <#assign pbu = clientProfile.getPbu()>
64 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
65
66 <#assign fultonBankpbu = "0727491">
67 <#if pbu == fultonBankpbu>
68 <style>
69 #hideFultonInfo {
70 display: none;
71 }
72 </style>
73 </#if>
74
75 <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)>
76 <#if (optoutData?size == 0)>
77 <#if (subbu_special?has_content)>
78 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
79 <script>
80 console.log('new subbu', '${subbu_special!''}');
81 </script>
82 <#else>
83 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
84 </#if>
85 <#if (fiCardsData?size > 0)>
86 <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)>
87 <#assign cardProviderAbbreviated = ''>
88 <#if (cardProvider?size > 0)>
89 <#-- This will be V for visa or M for mastercard. -->
90 <#assign cardProviderAbbreviated = cardProvider[0].cardType>
91 <#else>
92 <script>
93 console.log('No V or M data')
94 </script>
95 </#if>
96 <#list fiCardsData as fib>
97 <#switch fib.offerType>
98 <#case "101">
99 <#assign productURL = "consumer-edr2112">
100 <#assign productName = "Everyday Rewards+">
101 <#break>
102 <#case "104">
103 <#assign productURL = "max-cash">
104 <#assign productName = "Max Cash Preferred Card">
105 <#break>
106 <#case "108">
107 <#assign productURL="consumer-platinum2103">
108 <#assign productName="Platinum Card">
109 <#break>
110 <#case "109">
111 <#assign productURL="consumer-platinum2103">
112 <#assign productName="Platinum Card">
113 <#break>
114 <#case "115">
115 <#assign productURL = "secured">
116 <#assign productName = "Secured Card" >
117 <#break>
118 <#case "138">
119 <#assign productURL = "travel-rewards-plus">
120 <#assign productName = "Travel Rewards+" >
121 <#break>
122 <#case "141">
123 <#assign productURL = "college-real-rewards">
124 <#assign productName = "College Real Rewards" >
125 <#break>
126 <#case "147">
127 <#assign productURL = "max-cash-secured">
128 <#assign productName = "Max Cash Secured Card" >
129 <#break>
130 <#case "154">
131 <#assign productURL = "reserve-rewards-plus">
132 <#assign productName = "Reserve Rewards+" >
133 <#break>
134 <#case "121">
135 <#assign productURL = "business-platinum2103">
136 <#assign productName = "Business Card" >
137 <#break>
138 <#case "128">
139 <#assign productURL = "business-cash-preferred">
140 <#assign productName = "Business Cash Preferred" >
141 <#break>
142 <#case "143">
143 <#assign productURL = "business-real-rewards">
144 <#assign productName = "Business Real Rewards Card" >
145 <#break>
146 <#case "144">
147 <#assign productURL = "smart-business-rewards">
148 <#assign productName = "Smart Business Rewards Card" >
149 <#break>
150 <#default>
151 </#switch>
152 <#if productURL?has_content && url?matches(".*/${productURL}\\?.*")>
153 <#list product.getSiblings() as card>
154 <#if (card.offerType.getData() == fib.offerType)>
155 <div class="content-container" title="${partnerName!''} - Disclaimer">
156 <div class="jn-disclaimer">
157 <#if pbuList.getData()?has_content && pbuList.getData()?contains(pbu) && card.disclaimerAssociatedBank.getData()?has_content>
158 <#if isEmployee && card.employeeDisclaimerAssociatedBank?has_content>
159 ${card.employeeDisclaimerAssociatedBank.getData()}
160 <#else>
161 ${card.disclaimerAssociatedBank.getData()}
162 </#if>
163 <#else>
164 <#if isEmployee && card.employeeDisclaimerVisa?has_content && cardProviderAbbreviated?contains('V')>
165 ${card.employeeDisclaimerVisa.getData()}
166 <#elseif isEmployee && card.employeeDisclaimerMasterCard?has_content && cardProviderAbbreviated?contains('M')>
167 ${card.employeeDisclaimerMasterCard.getData()}
168 <#elseif (card.disclaimerVisa?has_content && cardProviderAbbreviated?contains('V'))>
169 ${card.disclaimerVisa.getData()}
170 <#elseif (card.disclaimerMasterCard?has_content && cardProviderAbbreviated?contains('M')) >
171 ${card.disclaimerMasterCard.getData()}
172 </#if>
173 </#if>
174 </div>
175 </div>
176 <#break>
177 </#if>
178 </#list>
179 <#break>
180 </#if>
181 </#list>
182 <#else>
183 <script>
184 console.log("Empty card data");
185 </script>
186 </#if>
187 <#else>
188 <script>
189 console.log("FI opt out");
190 </script>
191 </#if>
192
193<#else>
194 <script>
195 console.log("No lc for disclaimer");
196 </script>
197</#if>
Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing: ==> url404 [in template "10153#10191#5433717" at line 20, column 28] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${url404} [in template "10153#10191#5433717" at line 20, column 26] ----
1<#assign url = themeDisplay.getURLCurrent() >
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
4<#assign aDateTime = .now>
5<#assign currentYear = aDateTime?string.yyyy>
6
7<#if qstringmap["bankercode"]?has_content>
8 <#assign bCode= qstringmap["bankercode"]?first>
9 <#assign bCode = htmlUtil.escape(bCode)>
10 <#assign bCode = htmlUtil.escapeJS(bCode)>
11
12 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)>
13 <#list bData as b>
14 <#assign lc = b.reallocationcode >
15 </#list>
16
17<#else>
18 <script>
19 console.log("MainProductBcode missing");
20 location.href = '${url404}';
21 </script>
22</#if>
23
24<#assign prefix = "00000" >
25<#assign lcWithPrefix = prefix + lc >
26<#assign withPrefixLength = lcWithPrefix?length >
27<#assign startHere = withPrefixLength - 5>
28<#assign lc = lcWithPrefix?substring(startHere)>
29<#if lc?has_content>
30 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
31 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
32 <#assign clientProfile = clientProfileList?first>
33 <#assign pbu = clientProfile.getPbu()>
34 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
35 <#assign partnerName=clientProfile.getMarketingNameLong()>
36 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! />
37 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
38 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
39 <script>//console.log('partnerUrl: ${partnerUrl}')</script>
40 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
41 <#assign partnerUrl = 'https://' + partnerUrl>
42 <script>console.log('Come to here by accident')</script>
43 </#if>
44</#if>
45<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script>
46
47<footer class="footer bg-color-black text-color-white">
48 ${footerContent.getData()}
49</footer>
50<!-- BEGIN CALIFORNIA OPT-OUT MODAL -->
51
52<style>
53 #opt-out-button,
54 .modal__btn.learn-more {
55 background: #0C2074;
56 border: 1px solid #0C2074;
57 color: white;
58 text-transform: uppercase;
59 text-decoration: none;
60 font-size: 16px;
61 padding: 0.5rem 2rem;
62 display: inline-block;
63 border-radius: 0;
64 }
65 #opt-out-button:hover,
66 .modal__btn.learn-more:hover {
67 color: white;
68 border-color: #2C76AF !important;
69 background-color: #2C76AF !important;
70 }
71 .modal__btn.learn-more {
72 background: white;
73 border: 1px solid #0C2074;
74 color: #0C2074;
75 }
76 #opt-out-button[disabled="true"] {
77 background-color: rgba(0,0,0,.15);
78 color: rgba(0,0,0,.45);
79 border-color: rgba(0,0,0,.25);
80 }
81 #opt-out-button:hover[disabled="true"] {
82 background-color: rgba(0,0,0,.15) !important;
83 color: rgba(0,0,0,.45) !important;
84 border-color: rgba(0,0,0,.25) !important;
85 }
86 #opt-out-button:focus {
87 outline-style: solid;
88 outline-color: white;
89 outline-offset: -3px;
90 outline-width: 1px;
91 }
92 .opt-out-link svg {
93 width: 30px;
94 height: 14px;
95 width: auto;
96 vertical-align: middle;
97 }
98 .modal__overlay {
99 position: fixed;
100 top: 0;
101 left: 0;
102 right: 0;
103 bottom: 0;
104 background: rgba(0,0,0,0.6);
105 display: flex;
106 justify-content: center;
107 align-items: center;
108 }
109
110 .modal__container {
111 background-color: #fff;
112 padding: 30px;
113 max-width: 500px;
114 max-height: 100vh;
115 border-radius: 4px;
116 overflow-y: auto;
117 box-sizing: border-box;
118 }
119
120 .modal__header {
121 display: flex;
122 justify-content: space-between;
123 align-items: center;
124 }
125
126 .modal__title {
127 margin-top: 0;
128 margin-bottom: 0;
129 font-weight: 600;
130 font-size: 20px;
131 line-height: 1.25;
132 color: #00449e;
133 box-sizing: border-box;
134 }
135
136 .modal__close {
137 background: transparent;
138 border: 1px solid white;
139 padding: 4px 8px;
140 }
141 .modal__close:hover {
142 border: 1px solid black;
143 }
144
145 .modal__header .modal__close:before { content: "\2715"; }
146
147 .modal__content {
148 margin-top: 2rem;
149 margin-bottom: 2rem;
150 line-height: 1.5;
151 }
152
153 @keyframes mmfadeIn {
154 from { opacity: 0; }
155 to { opacity: 1; }
156 }
157
158 @keyframes mmfadeOut {
159 from { opacity: 1; }
160 to { opacity: 0; }
161 }
162
163 @keyframes mmslideIn {
164 from { transform: translateY(15%); }
165 to { transform: translateY(0); }
166 }
167
168 @keyframes mmslideOut {
169 from { transform: translateY(0); }
170 to { transform: translateY(-10%); }
171 }
172
173 .micromodal-slide {
174 display: none;
175 }
176
177 .micromodal-slide.is-open {
178 display: block;
179 }
180
181 .micromodal-slide[aria-hidden="false"] .modal__overlay {
182 animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
183 }
184
185 .micromodal-slide[aria-hidden="false"] .modal__container {
186 animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
187 }
188
189 .micromodal-slide[aria-hidden="true"] .modal__overlay {
190 animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
191 }
192
193 .micromodal-slide[aria-hidden="true"] .modal__container {
194 animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
195 }
196
197 .micromodal-slide .modal__container,
198 .micromodal-slide .modal__overlay {
199 will-change: transform;
200 }
201</style>
202
203<div class="modal micromodal-slide" id="modal-1" aria-hidden="true">
204 <div class="modal__overlay" tabindex="-1" data-micromodal-close>
205 <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
206 <header class="modal__header">
207 <h2 class="modal__title" id="modal-1-title">
208 Your California privacy choices
209 </h2>
210 <button class="modal__close" aria-label="Close modal" data-micromodal-close></button>
211 </header>
212 <div class="modal__content" id="modal-1-content">
213 <div id="message-no-cookie">
214 <p>
215 We use technologies, such as cookies, that gather information on our website. That information is used for a variety of purposes, such as to understand how visitors interact with our websites, or to serve advertisements on our websites or on other websites. The use of technologies, such as cookies, constitutes a ‘share’ or ‘sale’ of personal information under the California Privacy Rights Act. You can stop the use of certain third-party tracking technologies that are not considered our service providers by clicking on “Opt-Out” below or by broadcasting the global privacy control signal.</p>
216
217 <p> </p>
218
219 <p>Note that due to technological limitations, if you visit our website from a different computer or device, or clear cookies on your browser that store your preferences, you will need to return to this screen to opt-out and/or rebroadcast the signal. You can find a description of the types of tracking technologies, and your options with respect to those technologies, by clicking “Learn more” below.</p>
220 </div>
221 <div id="message-with-cookie">
222 <p>You have successfully opted-out.</p>
223 </div>
224 </div>
225 <div class="modal__footer">
226 <a href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank" class="modal__btn learn-more" aria-label="Learn more">Learn More</a>
227 <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button>
228 </div>
229 </div>
230 </div>
231</div>
232<!-- END CALIFORNIA OPT-OUT MODAL -->
233
234<script>
235 const copyrightNode = document.querySelector('.footer .copyright');
236 const fdicNode = document.querySelector('.footer .fdic');
237 const agreementNode = document.querySelector('.footer .member-agreement');
238 if(agreementNode) {
239 agreementNode.innerHTML='<p><a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!0}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a></p>';
240 }
241 if (copyrightNode) {
242 copyrightNode.innerHTML = '<sup>©</sup> Elan Financial Services ' + ${currentYear};
243 copyrightNode.classList.add('ecdma-footer-client-name-copyright');
244 }
245 if (fdicNode) {
246 fdicNode.innerHTML = '<p><a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a></p>';
247 fdicNode.insertAdjacentHTML('afterend', '<div style="display: inline-block; margin-left: 100px;"><a class="text-color-white opt-out-link" href="javascript:void(0);" data-micromodal-trigger="modal-1">Your California privacy choices <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve"><path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#fff"/><path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#06f"/><path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" fill="#fff"/><path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" fill="#06f"/></svg></a></div>');
248 }
249
250</script>
251<#if partnerUrl?has_content>
252 <script>
253 const homelinkNode = document.querySelector('.footer .copyright .homelink');
254 if (homelinkNode) {
255 homelinkNode.href="${partnerUrl!''}";
256 homelinkNode.title="${partnerName!''}";
257 homelinkNode.innerText="Home";
258 }
259 </script>
260</#if>
261<!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC -->
262
263<script>
264 window.getCookieDomain = function() {
265 var hostname = window.location.hostname.split(".");
266 return hostname && hostname.slice(hostname.length - 2).join(".");
267 }
268 window.setToOptOut = function() {
269 if (window.getCookie('privacy_optout')) {
270 document.getElementById('message-no-cookie').style.display = 'none';
271 document.getElementById('message-with-cookie').style.display = 'block';
272 document.getElementById('opt-out-button').setAttribute('disabled', true)
273 } else {
274 document.getElementById('message-no-cookie').style.display = 'block';
275 document.getElementById('message-with-cookie').style.display = 'none';
276 }
277 }
278 window.getCookie = function(name) {
279 var value = '; ' + document.cookie;
280 var parts = value.split('; ' + name + '=');
281 if (parts.length === 2) return parts.pop().split(';').shift();
282 }
283 window.californiaOptOut = function() {
284 if (!window.getCookie('privacy_optout')) {
285 document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;';
286 try {
287 if (window.CustomEvent) {
288 window.dispatchEvent(new CustomEvent('privacy_optout'));
289 } else {
290 var privacyOptoutEvent = document.createEvent('Event');
291 privacyOptoutEvent.initEvent('privacy_optout', true, true);
292 window.dispatchEvent(privacyOptoutEvent);
293 }
294 window.setToOptOut();
295 } catch (err) {
296 console.error(err);
297 }
298 }
299 }
300 MicroModal.init({
301 onShow: window.setToOptOut
302 });
303 AUI().ready(function() {
304 // user browser setting for Global Privacy Control to opt out of sharing information with third parties
305 const isBrowserGpcOptOut = navigator.globalPrivacyControl;
306 if(isBrowserGpcOptOut === true) {
307 window.californiaOptOut();
308 }
309 });
310</script>
311<!-- END CALIFORNIA OPT-OUT MODAL LOGIC -->