upLoading...

Redirecting you to a secure payment page…
1
{{pageTitles[currentPage-1]}}
2
{{pageTitles[currentPage-1]}}
3
{{pageTitles[currentPage-1]}}
{{item}}
USD
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
   Secure Payment
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}

{{item}}
   Secure Payment
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Card
or enter your card details below
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{item}}
{{ccfpInfo.notInGoodMessage || ''}}
{{item}}
{{donationAmountStr}}/{{recurringUnitText}} USD
{{cardTotalAmountIncludeFeeList}}
   Secure Payment
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Empowering LGBTQ+ Asians and Pacific Islanders and all communities we call home

The National Queer Asian Pacific Islander Alliance (NQAPIA) empowers LGBTQ+ Asians and Pacific Islanders and all communities we call home through movement capacity building, policy advocacy, and representation. Founded in 2005, NQAPIA builds the capacity of local, grassroots, and affinity-based LGBTQ+ AANHPI groups; advances an intersectional justice and equity agenda for all the communities we call home; supports intergenerational family (re)building and engagement; and ensures LGBTQ+ AANHPI representation everywhere, especially in research and resource development.<\/p>\n

Will you donate to build grassroots LGBTQ+ AANHPI power and help us get the resources we need to thrive?<\/strong><\/p>\n

Please also consider making a matching gift through your employer.<\/p>\n

For check donations, please make checks out to \"NQAPIA\" and mail to:<\/p>\n

NQAPIA\u0026nbsp;<\/p>\n

c\/o Frederick Tran<\/p>\n

PO Box 740681
Dallas, TX 75374<\/p>", pageTitles: ["Amount","Your information","Payment Details"], forwardButtons: ["Next","Next"], submitText: "Donate Now", hiddenFields: [], donorCoveredFeeEnabled: true, hideTheme: "0", popDomainUrl: '', tempFileDirUUid:'', //manual validate isEnableVisibleReCaptcha: false, isReCaptchaPassed: false, ccfpInfo: {"notInGood":false,"nonCaOrgNotInGood":false,"notInGoodMessage":null,"adminNotInGoodMessage":null}, caZipCodeList: ["90001","90001","90001","90002","90002","90003","90003","90004","90004","90005","90005","90006","90006","90007","90007","90008","90008","90008","90008","90008","90009","90009","90009","90009","90010","90010","90011","90012","90012","90013","90013","90014","90015","90016","90016","90017","90017","90018","90018","90018","90019","90019","90020","90020","90021","90021","90022","90022","90022","90022","90023","90023","90023","90024","90024","90025","90025","90025","90025","90026","90026","90026","90026","90027","90027","90027","90028","90028","90029","90029","90030","90031","90031","90031","90032","90033","90033","90034","90034","90035","90035","90036","90036","90036","90036","90037","90037","90038","90038","90038","90038","90038","90039","90039","90040","90040","90040","90041","90041","90042","90042","90043","90043","90043","90043","90044","90044","90044","90045","90045","90045","90045","90046","90046","90046","90047","90047","90048","90048","90048","90048","90048","90049","90049","90050","90051","90051","90052","90053","90054","90055","90056","90056","90056","90056","90057","90057","90058","90058","90059","90059","90059","90060","90061","90061","90061","90062","90062","90063","90063","90064","90064","90065","90065","90065","90066","90066","90066","90067","90067","90068","90068","90069","90069","90069","90070","90071","90071","90071","90072","90072","90073","90073","90073","90073","90073","90074","90074","90075","90076","90077","90077","90078","90078","90079","90080","90081","90082","90083","90084","90084","90086","90087","90088","90088","90089","90089","90091","90091","90091","90093","90094","90094","90095","90095","90096","90096","90099","90099","90099","90134","90134","90140","90140","90189","90189","90189","90201","90201","90201","90202","90202","90205","90205","90209","90210","90211","90212","90213","90220","90220","90220","90220","90221","90221","90221","90222","90222","90223","90224","90224","90224","90230","90230","90231","90232","90239","90240","90241","90242","90245","90247","90248","90249","90250","90250","90250","90251","90254","90255","90255","90255","90260","90261","90262","90263","90263","90264","90265","90266","90266","90267","90267","90270","90270","90272","90272","90274","90274","90274","90274","90274","90274","90274","90275","90275","90275","90275","90275","90275","90275","90275","90277","90278","90280","90290","90291","90291","90292","90292","90292","90293","90293","90294","90295","90295","90295","90296","90296","90301","90302","90303","90304","90305","90306","90307","90308","90309","90310","90311","90312","90401","90402","90403","90404","90405","90406","90407","90408","90409","90410","90411","90501","90502","90503","90504","90505","90506","90507","90508","90509","90510","90601","90601","90601","90601","90602","90603","90604","90605","90606","90606","90607","90608","90609","90610","90610","90620","90621","90622","90623","90623","90624","90630","90631","90631","90631","90631","90632","90633","90637","90638","90638","90638","90639","90639","90640","90650","90651","90652","90660","90661","90662","90670","90670","90671","90671","90680","90701","90701","90702","90703","90703","90704","90704","90704","90706","90707","90710","90711","90712","90713","90714","90715","90716","90716","90716","90717","90720","90720","90720","90721","90723","90731","90731","90731","90731","90732","90733","90734","90740","90742","90743","90744","90745","90745","90746","90746","90747","90747","90747","90747","90748","90749","90749","90755","90755","90755","90801","90802","90803","90803","90803","90804","90804","90805","90805","90805","90806","90807","90807","90807","90808","90809","90810","90810","90810","90810","90813","90814","90815","90822","90822","90831","90832","90833","90840","90840","90840","90842","90842","90844","90844","90846","90846","90847","90847","90848","90848","90848","90853","90895","90895","90895","91001","91003","91006","91007","91008","91008","91009","91010","91011","91011","91011","91011","91011","91012","91012","91012","91016","91017","91020","91021","91023","91024","91025","91030","91030","91031","91031","91040","91040","91041","91042","91043","91046","91066","91077","91101","91102","91103","91104","91105","91106","91107","91108","91108","91109","91110","91110","91114","91115","91116","91117","91118","91118","91121","91121","91123","91123","91124","91124","91125","91125","91126","91126","91129","91129","91182","91182","91184","91184","91185","91185","91188","91188","91189","91189","91199","91199","91201","91202","91203","91204","91205","91206","91207","91208","91209","91210","91210","91214","91214","91221","91222","91224","91224","91225","91226","91301","91301","91301","91301","91301","91301","91301","91301","91301","91301","91302","91302","91302","91302","91302","91303","91303","91303","91304","91304","91304","91305","91306","91306","91307","91307","91307","91308","91308","91309","91310","91310","91311","91313","91316","91316","91319","91319","91320","91320","91320","91321","91321","91321","91322","91322","91324","91325","91325","91325","91326","91326","91327","91327","91328","91330","91330","91331","91331","91331","91331","91333","91334","91334","91335","91335","91337","91340","91341","91342","91342","91342","91342","91342","91342","91343","91343","91343","91344","91344","91345","91345","91346","91346","91350","91350","91350","91350","91350","91350","91350","91351","91351","91351","91352","91352","91352","91352","91353","91354","91354","91355","91355","91356","91357","91358","91359","91359","91359","91359","91360","91361","91361","91361","91361","91361","91362","91362","91362","91364","91364","91365","91365","91367","91367","91371","91371","91371","91372","91372","91372","91376","91376","91377","91377","91380","91380","91381","91381","91381","91381","91381","91382","91383","91384","91384","91384","91385","91385","91386","91386","91386","91387","91387","91387","91387","91390","91390","91390","91390","91390","91390","91390","91390","91392","91393","91393","91394","91395","91396","91396","91401","91401","91401","91402","91402","91403","91403","91404","91405","91405","91406","91406","91407","91408","91409","91410","91411","91411","91412","91412","91413","91413","91416","91416","91423","91423","91426","91426","91436","91436","91470","91470","91482","91482","91499","91499","91501","91501","91502","91503","91504","91505","91506","91507","91507","91508","91510","91521","91521","91522","91522","91523","91523","91526","91526","91601","91601","91601","91601","91601","91601","91602","91602","91602","91602","91602","91602","91603","91603","91604","91604","91604","91605","91605","91606","91606","91606","91607","91607","91607","91607","91607","91607","91607","91608","91608","91608","91608","91609","91609","91610","91610","91610","91614","91614","91614","91615","91615","91616","91616","91617","91617","91617","91617","91618","91618","91618","91701","91701","91701","91702","91702","91706","91706","91708","91709","91710","91710","91710","91711","91714","91714","91715","91715","91716","91716","91722","91723","91724","91724","91729","91729","91729","91730","91730","91730","91731","91732","91732","91732","91733","91733","91733","91734","91735","91735","91737","91737","91737","91739","91739","91739","91740","91741","91743","91744","91744","91744","91745","91745","91745","91745","91745","91746","91746","91746","91746","91747","91748","91748","91748","91748","91748","91748","91749","91750","91752","91752","91752","91754","91755","91756","91756","91756","91756","91756","91758","91759","91761","91762","91762","91763","91764","91765","91765","91766","91766","91766","91767","91768","91769","91770","91771","91771","91772","91772","91773","91775","91776","91778","91780","91784","91785","91786","91788","91789","91789","91789","91789","91790","91791","91792","91793","91801","91802","91803","91804","91896","91899","91901","91902","91903","91905","91906","91908","91909","91910","91911","91912","91913","91914","91915","91916","91917","91921","91931","91932","91932","91933","91933","91934","91935","91941","91942","91943","91944","91945","91946","91948","91950","91950","91951","91962","91963","91976","91977","91978","91979","91980","91987","91987","92003","92004","92004","92007","92007","92008","92009","92009","92009","92010","92011","92011","92011","92013","92014","92018","92019","92020","92021","92021","92021","92022","92023","92024","92024","92024","92025","92026","92026","92027","92028","92028","92029","92029","92030","92033","92036","92037","92038","92039","92040","92046","92049","92051","92052","92054","92054","92054","92055","92055","92055","92055","92056","92057","92058","92059","92060","92060","92061","92061","92064","92065","92066","92066","92066","92067","92067","92068","92068","92069","92069","92070","92071","92072","92074","92075","92078","92078","92079","92081","92082","92083","92084","92085","92086","92086","92088","92091","92091","92092","92092","92092","92093","92093","92093","92096","92096","92101","92102","92103","92104","92105","92106","92107","92107","92108","92109","92109","92110","92111","92112","92113","92114","92115","92116","92117","92118","92118","92119","92120","92121","92122","92123","92124","92126","92127","92128","92128","92129","92130","92131","92132","92132","92134","92134","92135","92135","92135","92136","92136","92137","92138","92139","92140","92140","92142","92143","92143","92145","92145","92147","92147","92149","92150","92152","92152","92153","92153","92154","92155","92155","92158","92158","92159","92160","92161","92161","92163","92165","92166","92167","92168","92169","92170","92171","92172","92173","92173","92174","92175","92176","92177","92178","92178","92179","92182","92182","92186","92187","92187","92191","92192","92193","92195","92196","92197","92198","92199","92201","92201","92201","92202","92203","92203","92210","92210","92211","92220","92222","92223","92223","92225","92225","92225","92226","92227","92230","92231","92231","92232","92233","92234","92234","92235","92235","92236","92239","92239","92239","92240","92240","92241","92241","92241","92241","92242","92242","92243","92244","92247","92248","92249","92250","92250","92251","92252","92253","92254","92254","92255","92256","92256","92257","92257","92258","92258","92258","92258","92259","92260","92261","92262","92262","92262","92262","92263","92264","92266","92267","92267","92268","92268","92270","92273","92274","92274","92274","92274","92274","92274","92274","92274","92275","92275","92276","92276","92276","92276","92276","92276","92277","92277","92277","92278","92278","92278","92278","92280","92280","92280","92281","92282","92282","92283","92283","92284","92285","92285","92285","92285","92286","92301","92301","92304","92304","92305","92305","92307","92308","92308","92309","92309","92310","92310","92311","92311","92312","92313","92314","92315","92315","92316","92316","92317","92318","92320","92321","92322","92322","92322","92323","92324","92324","92325","92325","92325","92327","92328","92328","92328","92328","92329","92331","92332","92332","92333","92334","92335","92336","92337","92338","92338","92338","92339","92339","92340","92341","92341","92342","92342","92344","92344","92345","92346","92347","92347","92350","92350","92352","92352","92354","92354","92356","92356","92357","92357","92358","92359","92359","92363","92363","92363","92363","92364","92364","92365","92365","92366","92368","92369","92371","92372","92373","92373","92373","92373","92374","92375","92376","92377","92378","92382","92382","92382","92382","92384","92385","92386","92386","92389","92389","92391","92392","92393","92394","92394","92395","92395","92395","92397","92398","92399","92399","92401","92401","92402","92402","92403","92403","92404","92404","92404","92405","92405","92406","92406","92407","92407","92407","92407","92407","92407","92407","92407","92407","92408","92408","92410","92410","92410","92411","92411","92413","92413","92413","92415","92415","92415","92418","92418","92418","92423","92423","92427","92427","92501","92502","92503","92503","92504","92504","92504","92505","92505","92506","92507","92507","92507","92508","92509","92509","92513","92514","92516","92517","92518","92518","92518","92519","92521","92521","92522","92522","92530","92530","92531","92531","92532","92532","92536","92536","92539","92543","92544","92544","92545","92546","92548","92549","92551","92552","92553","92554","92555","92555","92556","92557","92561","92561","92561","92562","92562","92563","92563","92564","92564","92567","92567","92570","92570","92571","92572","92581","92582","92583","92583","92583","92584","92584","92584","92584","92585","92585","92585","92585","92586","92586","92586","92586","92587","92587","92587","92587","92587","92589","92589","92590","92590","92591","92591","92592","92592","92593","92593","92595","92596","92596","92599","92599","92602","92603","92604","92605","92605","92606","92607","92607","92609","92609","92610","92610","92610","92610","92612","92614","92615","92615","92616","92617","92618","92619","92620","92623","92624","92624","92624","92625","92625","92626","92627","92628","92629","92629","92629","92630","92630","92637","92637","92646","92646","92646","92647","92647","92648","92648","92648","92649","92649","92650","92650","92651","92652","92652","92653","92653","92653","92653","92654","92654","92654","92655","92656","92656","92656","92657","92657","92658","92659","92660","92661","92662","92662","92662","92663","92672","92673","92674","92675","92675","92675","92676","92676","92676","92677","92677","92678","92678","92679","92679","92679","92679","92679","92679","92679","92679","92679","92683","92684","92685","92688","92688","92688","92688","92690","92690","92690","92691","92691","92691","92692","92692","92692","92693","92693","92694","92694","92694","92694","92694","92697","92697","92697","92698","92698","92701","92702","92703","92703","92704","92704","92704","92705","92705","92705","92706","92706","92707","92707","92707","92708","92708","92708","92711","92712","92728","92728","92728","92735","92780","92781","92782","92799","92801","92802","92802","92803","92804","92804","92805","92805","92806","92806","92807","92807","92808","92808","92809","92809","92811","92812","92814","92815","92816","92817","92817","92821","92822","92823","92825","92831","92832","92833","92834","92835","92836","92837","92838","92840","92841","92842","92843","92844","92845","92846","92850","92850","92856","92857","92859","92860","92861","92861","92862","92863","92864","92865","92866","92867","92867","92868","92869","92870","92871","92877","92878","92879","92880","92880","92881","92882","92883","92883","92883","92885","92886","92887","92899","93001","93001","93001","93001","93002","93003","93003","93004","93004","93004","93005","93006","93007","93009","93009","93010","93011","93012","93012","93012","93013","93014","93015","93016","93020","93021","93022","93023","93023","93024","93030","93031","93032","93033","93034","93035","93036","93040","93041","93041","93041","93041","93042","93042","93042","93042","93042","93043","93043","93043","93043","93043","93044","93044","93044","93060","93061","93062","93063","93063","93064","93064","93064","93065","93066","93067","93094","93099","93099","93101","93102","93103","93105","93105","93106","93106","93106","93106","93107","93107","93108","93108","93109","93110","93110","93111","93111","93116","93116","93117","93117","93117","93117","93118","93118","93120","93121","93130","93140","93150","93150","93160","93190","93199","93199","93199","93201","93202","93203","93203","93203","93204","93205","93206","93207","93207","93208","93208","93210","93212","93215","93216","93218","93219","93219","93220","93221","93222","93222","93222","93223","93224","93225","93226","93227","93230","93232","93234","93235","93237","93238","93238","93239","93239","93240","93240","93241","93242","93243","93243","93243","93244","93245","93245","93246","93246","93246","93246","93246","93247","93247","93247","93249","93250","93251","93252","93254","93254","93255","93256","93257","93257","93257","93258","93260","93260","93261","93262","93262","93263","93265","93266","93267","93268","93270","93271","93272","93274","93275","93276","93277","93278","93279","93280","93282","93282","93283","93285","93285","93286","93286","93287","93290","93291","93292","93301","93302","93303","93304","93305","93306","93307","93308","93309","93311","93312","93313","93313","93313","93314","93314","93380","93383","93383","93383","93384","93385","93386","93387","93388","93389","93390","93401","93401","93402","93402","93402","93402","93403","93403","93405","93405","93406","93406","93407","93407","93407","93407","93408","93408","93408","93409","93409","93409","93410","93410","93410","93410","93412","93412","93412","93420","93421","93422","93423","93424","93426","93426","93426","93426","93427","93428","93429","93430","93432","93433","93434","93435","93436","93436","93437","93437","93437","93437","93438","93440","93441","93442","93443","93444","93445","93446","93446","93446","93446","93446","93446","93447","93448","93448","93449","93449","93450","93451","93451","93451","93452","93452","93453","93453","93453","93453","93454","93454","93454","93454","93455","93455","93456","93457","93457","93458","93460","93461","93461","93463","93463","93464","93465","93475","93483","93501","93501","93501","93502","93504","93504","93505","93505","93510","93512","93512","93513","93514","93514","93514","93514","93514","93514","93514","93514","93514","93515","93516","93516","93516","93516","93517","93518","93518","93518","93519","93519","93522","93523","93523","93523","93523","93523","93524","93524","93524","93524","93526","93526","93527","93527","93528","93529","93529","93530","93531","93532","93532","93532","93532","93532","93532","93532","93534","93534","93534","93534","93534","93534","93535","93535","93535","93535","93535","93535","93536","93536","93536","93536","93536","93536","93539","93541","93541","93541","93542","93543","93543","93543","93544","93544","93545","93545","93545","93545","93545","93546","93546","93546","93546","93549","93549","93550","93550","93550","93551","93551","93551","93551","93552","93553","93553","93554","93554","93554","93555","93555","93555","93556","93558","93558","93560","93560","93560","93560","93561","93561","93561","93561","93561","93561","93561","93561","93561","93561","93562","93562","93562","93562","93563","93563","93581","93584","93586","93586","93590","93591","93591","93591","93592","93596","93599","93599","93601","93601","93602","93602","93603","93603","93604","93605","93606","93607","93607","93608","93608","93609","93610","93610","93610","93611","93611","93612","93613","93614","93615","93616","93618","93618","93619","93620","93621","93622","93623","93624","93625","93626","93627","93628","93628","93630","93631","93633","93633","93633","93633","93633","93634","93634","93635","93636","93637","93637","93638","93639","93640","93641","93641","93642","93642","93642","93643","93644","93645","93646","93647","93647","93648","93649","93650","93650","93651","93652","93653","93654","93654","93656","93657","93657","93657","93657","93660","93661","93661","93662","93662","93664","93665","93665","93666","93667","93668","93669","93669","93670","93673","93675","93675","93675","93701","93702","93703","93704","93705","93706","93706","93707","93708","93709","93710","93711","93712","93714","93715","93716","93717","93718","93720","93721","93722","93723","93724","93724","93725","93725","93725","93726","93727","93728","93729","93730","93737","93740","93740","93740","93741","93741","93744","93745","93745","93747","93750","93750","93755","93760","93760","93761","93761","93764","93764","93765","93765","93771","93772","93773","93774","93775","93776","93777","93778","93779","93786","93786","93790","93791","93792","93793","93794","93844","93844","93888","93888","93901","93902","93905","93905","93906","93907","93907","93908","93908","93908","93912","93915","93920","93920","93920","93920","93921","93921","93921","93922","93923","93923","93924","93924","93924","93924","93925","93926","93927","93928","93928","93928","93930","93932","93933","93933","93940","93940","93940","93940","93942","93943","93944","93944","93944","93950","93950","93953","93954","93955","93955","93960","93962","93962","94002","94005","94010","94010","94011","94014","94014","94015","94015","94016","94017","94018","94019","94019","94020","94021","94022","94022","94022","94023","94024","94024","94024","94025","94025","94025","94026","94027","94027","94028","94028","94028","94028","94030","94035","94035","94035","94037","94038","94039","94040","94040","94040","94041","94042","94043","94044","94044","94060","94061","94061","94062","94062","94062","94062","94063","94064","94065","94066","94070","94074","94080","94080","94080","94080","94083","94083","94083","94085","94086","94087","94088","94088","94089","94102","94103","94104","94105","94107","94108","94109","94110","94111","94112","94114","94115","94116","94117","94118","94119","94120","94121","94122","94123","94124","94125","94126","94127","94128","94128","94129","94129","94130","94131","94132","94133","94134","94137","94137","94139","94139","94139","94140","94141","94142","94143","94143","94144","94144","94145","94145","94146","94147","94151","94151","94158","94159","94160","94160","94161","94161","94163","94163","94164","94172","94177","94177","94188","94203","94203","94204","94204","94205","94205","94206","94206","94207","94207","94208","94208","94209","94209","94211","94211","94229","94229","94230","94230","94232","94232","94234","94234","94235","94235","94236","94236","94237","94237","94239","94239","94240","94240","94244","94244","94245","94245","94247","94247","94248","94248","94249","94249","94250","94250","94252","94252","94254","94254","94256","94256","94257","94257","94258","94258","94259","94259","94261","94261","94262","94262","94263","94263","94267","94267","94268","94268","94269","94269","94271","94271","94273","94273","94274","94274","94277","94277","94278","94278","94279","94279","94280","94280","94282","94282","94283","94283","94284","94284","94285","94285","94287","94287","94288","94288","94289","94289","94290","94290","94291","94291","94293","94293","94294","94294","94295","94295","94296","94296","94297","94297","94298","94298","94299","94299","94301","94302","94303","94303","94303","94304","94305","94305","94306","94309","94309","94401","94402","94403","94404","94404","94497","94497","94501","94501","94502","94503","94503","94503","94505","94505","94506","94506","94507","94508","94509","94510","94511","94512","94513","94514","94514","94515","94516","94517","94518","94519","94520","94520","94521","94522","94523","94523","94524","94525","94526","94527","94528","94529","94529","94529","94530","94531","94533","94534","94534","94535","94535","94536","94537","94538","94539","94540","94541","94542","94543","94544","94545","94546","94546","94547","94547","94548","94549","94550","94551","94552","94552","94553","94553","94553","94555","94556","94557","94557","94558","94558","94559","94560","94561","94562","94563","94564","94565","94565","94565","94565","94566","94567","94568","94568","94569","94570","94571","94572","94573","94574","94575","94576","94576","94577","94578","94579","94580","94581","94582","94583","94585","94585","94586","94587","94588","94589","94589","94589","94590","94591","94592","94592","94595","94595","94596","94597","94597","94598","94599","94601","94602","94602","94603","94604","94605","94606","94607","94608","94608","94609","94610","94610","94611","94611","94612","94612","94613","94614","94615","94617","94618","94618","94619","94620","94620","94621","94622","94622","94623","94624","94649","94649","94659","94659","94660","94660","94661","94662","94662","94666","94666","94701","94702","94703","94704","94705","94706","94706","94706","94707","94707","94707","94708","94708","94709","94710","94710","94712","94720","94720","94801","94801","94801","94801","94801","94802","94803","94803","94803","94804","94805","94805","94806","94806","94806","94806","94807","94808","94820","94820","94850","94901","94901","94903","94903","94903","94903","94904","94904","94904","94912","94913","94914","94914","94915","94915","94920","94920","94920","94920","94922","94923","94923","94924","94925","94926","94926","94926","94927","94927","94928","94928","94929","94930","94931","94933","94937","94938","94939","94940","94941","94941","94941","94941","94942","94945","94945","94945","94946","94947","94948","94949","94949","94949","94950","94951","94952","94952","94952","94952","94952","94953","94954","94955","94956","94956","94957","94960","94963","94964","94965","94965","94965","94966","94970","94971","94972","94973","94974","94975","94976","94977","94978","94979","94998","94998","94999","95001","95002","95002","95003","95003","95003","95003","95004","95005","95006","95006","95007","95008","95009","95010","95011","95012","95013","95014","95014","95014","95015","95017","95018","95018","95019","95020","95021","95023","95024","95026","95026","95026","95030","95030","95031","95032","95033","95035","95036","95037","95038","95039","95041","95042","95043","95043","95043","95043","95043","95044","95044","95044","95045","95045","95046","95050","95051","95052","95053","95053","95054","95055","95056","95060","95060","95060","95060","95061","95062","95063","95064","95065","95066","95066","95067","95067","95070","95071","95073","95075","95076","95076","95076","95076","95076","95076","95076","95076","95077","95101","95103","95106","95108","95109","95110","95111","95112","95113","95115","95116","95117","95118","95119","95120","95121","95122","95123","95124","95125","95126","95127","95128","95129","95130","95131","95132","95133","95134","95135","95136","95138","95139","95140","95140","95140","95141","95148","95150","95151","95152","95153","95154","95155","95156","95157","95158","95159","95160","95161","95164","95170","95172","95173","95190","95190","95191","95191","95192","95192","95193","95193","95194","95194","95196","95196","95201","95201","95202","95202","95203","95203","95204","95204","95205","95205","95206","95206","95207","95207","95208","95208","95209","95209","95210","95210","95211","95211","95211","95211","95211","95212","95212","95212","95213","95213","95214","95214","95215","95215","95219","95219","95220","95221","95221","95222","95223","95223","95223","95223","95224","95225","95226","95226","95226","95227","95228","95229","95229","95230","95231","95232","95233","95233","95234","95236","95237","95240","95241","95242","95245","95245","95246","95246","95246","95246","95247","95248","95248","95248","95249","95251","95252","95252","95253","95254","95255","95257","95258","95267","95267","95269","95269","95296","95296","95296","95297","95297","95301","95303","95304","95304","95305","95306","95306","95307","95309","95310","95311","95312","95313","95315","95316","95317","95318","95319","95320","95321","95322","95322","95323","95324","95325","95326","95327","95328","95329","95330","95333","95334","95335","95335","95336","95337","95338","95340","95341","95343","95344","95345","95346","95346","95347","95348","95350","95351","95352","95353","95354","95355","95356","95357","95358","95360","95361","95361","95361","95363","95363","95363","95364","95364","95365","95366","95367","95368","95369","95370","95372","95373","95373","95374","95375","95375","95376","95377","95378","95379","95380","95381","95382","95383","95385","95386","95387","95388","95389","95389","95389","95389","95389","95389","95391","95391","95391","95397","95397","95401","95402","95403","95403","95404","95405","95406","95407","95407","95409","95409","95410","95412","95415","95416","95416","95416","95416","95416","95417","95417","95418","95418","95419","95420","95421","95422","95423","95423","95423","95424","95424","95425","95425","95425","95426","95427","95427","95428","95429","95430","95431","95432","95433","95435","95436","95437","95437","95437","95437","95437","95437","95437","95439","95441","95442","95443","95444","95445","95445","95446","95446","95448","95449","95450","95450","95451","95452","95453","95454","95454","95456","95456","95457","95458","95459","95459","95460","95461","95461","95461","95462","95462","95462","95463","95464","95465","95466","95467","95467","95468","95468","95469","95470","95470","95471","95472","95472","95473","95476","95476","95476","95480","95480","95480","95481","95482","95485","95486","95487","95488","95488","95490","95492","95493","95493","95493","95494","95497","95501","95502","95503","95511","95514","95518","95519","95521","95521","95521","95521","95524","95525","95526","95526","95526","95527","95528","95531","95531","95532","95532","95534","95534","95536","95537","95537","95538","95538","95540","95542","95543","95545","95546","95546","95546","95547","95548","95549","95550","95551","95552","95553","95554","95555","95556","95558","95559","95560","95562","95563","95564","95565","95567","95568","95568","95569","95570","95571","95573","95585","95587","95589","95589","95595","95601","95602","95603","95603","95603","95603","95603","95604","95604","95605","95605","95605","95605","95605","95606","95607","95607","95608","95609","95610","95610","95611","95611","95612","95613","95614","95614","95615","95615","95615","95615","95616","95617","95618","95618","95619","95619","95620","95620","95621","95621","95623","95623","95624","95625","95626","95627","95628","95629","95630","95630","95630","95630","95630","95631","95631","95631","95631","95632","95633","95634","95634","95634","95634","95634","95635","95636","95637","95638","95638","95639","95640","95640","95640","95640","95641","95641","95641","95641","95642","95642","95644","95644","95645","95645","95646","95646","95646","95646","95646","95646","95646","95646","95648","95648","95648","95650","95651","95652","95653","95654","95654","95655","95655","95655","95656","95658","95659","95659","95659","95659","95659","95660","95660","95661","95661","95662","95662","95663","95664","95665","95666","95666","95667","95667","95667","95667","95667","95667","95667","95667","95667","95667","95668","95668","95669","95670","95670","95670","95670","95671","95671","95672","95673","95674","95675","95675","95676","95677","95677","95678","95679","95680","95681","95682","95682","95682","95682","95683","95683","95683","95684","95684","95684","95684","95685","95685","95686","95687","95688","95688","95689","95690","95690","95690","95690","95690","95690","95690","95690","95690","95691","95691","95692","95693","95694","95695","95696","95697","95698","95699","95699","95701","95703","95703","95709","95709","95709","95709","95712","95713","95713","95713","95713","95713","95713","95714","95715","95715","95715","95717","95717","95720","95720","95721","95721","95722","95724","95724","95726","95726","95726","95728","95728","95728","95728","95728","95735","95736","95741","95741","95742","95742","95746","95746","95747","95757","95758","95759","95762","95762","95762","95763","95765","95776","95798","95798","95798","95799","95799","95811","95812","95813","95814","95815","95815","95816","95817","95818","95819","95820","95820","95821","95822","95823","95824","95825","95826","95826","95827","95828","95829","95830","95831","95832","95833","95834","95835","95836","95837","95838","95840","95840","95841","95841","95842","95843","95843","95851","95852","95853","95860","95864","95865","95866","95867","95867","95894","95894","95899","95901","95901","95901","95901","95901","95903","95903","95910","95910","95912","95912","95913","95914","95915","95915","95915","95915","95916","95916","95917","95918","95919","95920","95920","95922","95923","95923","95923","95923","95924","95925","95925","95926","95927","95928","95928","95928","95928","95929","95929","95930","95930","95932","95934","95934","95935","95936","95937","95938","95939","95939","95940","95940","95941","95942","95942","95943","95943","95943","95944","95945","95945","95945","95945","95945","95945","95945","95945","95945","95945","95945","95945","95945","95946","95946","95947","95947","95948","95948","95948","95949","95950","95951","95951","95953","95953","95954","95954","95954","95955","95956","95956","95957","95957","95958","95958","95959","95959","95959","95959","95959","95960","95960","95960","95960","95961","95961","95961","95961","95962","95962","95963","95963","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95965","95966","95967","95968","95969","95970","95970","95971","95971","95971","95971","95971","95971","95972","95973","95973","95973","95973","95974","95975","95975","95976","95976","95977","95977","95977","95977","95978","95979","95979","95979","95979","95980","95980","95980","95980","95980","95980","95980","95981","95981","95982","95983","95983","95984","95984","95986","95987","95987","95987","95988","95988","95991","95991","95992","95993","96001","96001","96002","96003","96006","96007","96007","96008","96009","96010","96011","96013","96013","96014","96015","96016","96017","96017","96019","96019","96019","96020","96021","96022","96023","96024","96025","96027","96027","96028","96028","96029","96029","96031","96031","96032","96033","96034","96035","96037","96038","96039","96040","96041","96041","96044","96044","96046","96047","96047","96048","96048","96049","96050","96050","96051","96052","96054","96055","96056","96056","96056","96057","96058","96059","96061","96062","96063","96063","96064","96065","96065","96067","96068","96069","96070","96070","96071","96073","96074","96075","96076","96076","96078","96079","96079","96079","96079","96080","96080","96084","96084","96085","96086","96087","96088","96088","96089","96089","96090","96091","96091","96092","96093","96094","96094","96094","96095","96096","96097","96099","96101","96101","96101","96101","96103","96103","96103","96103","96103","96103","96104","96105","96106","96107","96107","96108","96108","96109","96110","96111","96112","96112","96113","96113","96113","96114","96115","96116","96117","96118","96119","96120","96120","96120","96120","96120","96120","96120","96121","96122","96122","96123","96124","96124","96125","96125","96126","96127","96128","96129","96129","96130","96130","96130","96130","96130","96132","96133","96134","96134","96134","96134","96134","96135","96136","96137","96137","96137","96140","96140","96140","96140","96140","96140","96141","96141","96142","96142","96142","96143","96143","96145","96145","96145","96146","96146","96146","96146","96146","96148","96150","96150","96151","96151","96151","96152","96152","96154","96154","96155","96155","96155","96155","96156","96156","96156","96156","96157","96157","96157","96158","96158","96158","96160","96161","96161","96161","96161","96161","96161","96161","96161","96162","96162","96162"], constituentZipCode: null, isProfilePhoto: false, } appData.initMethods.push(function(){ if (this.formData.account && this.formData.account.address && this.formData.account.address.line1 !== undefined) { if(this.formData.payment && this.formData.payment.card) { this.sameAsBillingAddress = true } } if (this.formData.payment && this.formData.payment.card) { this.formData.payment.card.holderFirstName = this.firstName this.formData.payment.card.holderLastName = this.lastName this.formData.payment.card.holderEmail = this.email } if (this.formData.payment && this.formData.payment.ach) { this.formData.payment.ach.holderFirstName = this.firstName this.formData.payment.ach.holderLastName = this.lastName this.formData.payment.ach.holderEmail = this.email } }) const appMethods = { showField: function (fieldName){ fieldName = this.filterFieldName(fieldName); if(this.hiddenFields.includes(fieldName)){ return false } return true }, nextPage: function () { if(this.checkWithoutPayment()){ return } // validate if (this.validatePage(this.currentPage)) { this.currentPage = this.currentPage + 1 } if(this.currentPage === 3) { this.atLastPage() } }, previousPage: function () { this.currentPage = this.currentPage - 1 }, atLastPage: function () { // override by yourself on the other module }, isOtherPaymentField: function (element) { let fieldName = element.getAttribute('name') if (fieldName === null) { return true } if(this.withoutPayment && fieldName.indexOf('payment.') === 0){ return true } if(this.separatePayment && fieldName.indexOf('payment.') !== 0){ return true } if (this.paymentType === 'CARD' && this.payingWithAppleOrGooglePay && fieldName.indexOf('payment.') === 0) { return true } if (this.paymentType === 'CARD' && fieldName.indexOf('payment.ach.') === 0) { return true }else if(this.paymentType==='ACH' && fieldName.indexOf('payment.card.')===0){ return true }else if((this.paymentType==='PAY_LATER' || this.paymentType==='PAYPAL' || this.paymentType==='DAF') && fieldName.indexOf('payment.')===0){ return true } return false }, isNeedValidation:function(element){ if(this.isOtherPaymentField(element)){ return false } if(element.disabled){ return false } if(this.hiddenFields.includes(this.filterFieldName(element.getAttribute('name')))){ return false } return true }, validatePage: function(pageNumber){ let page = document.getElementById('neon-page-'+pageNumber) let itemObj={} for(let et of ['input','select','textarea']) { for (let item of page.getElementsByTagName(et)) { itemObj[item.getAttribute('name')] = item } } let pass = true let firstElement = null // FormData don't return un-checked checkbox let formData = this.getFormData() let es=document.getElementById('neonform_4').elements for(let e of es){ let fieldName=e.getAttribute('name') if(itemObj[fieldName]){ if(!this.isNeedValidation(e)){ continue } if(!this.validateField(e,formData.getAll(fieldName))){ if(firstElement===null){ firstElement = e } pass = false } } } if(firstElement!=null) { this.$nextTick(function(){ firstElement.focus() // donation amount special logic if(firstElement.getAttribute('name')==='amount'){ firstElement = document.getElementsByName('frequency')[0] firstElement.focus() } // Custom file upload box if(firstElement.getAttribute('type') === 'hidden' && firstElement.getAttribute('id').indexOf('customFields') > -1) { let uploadBox = document.getElementById('neon-file-upload-box-' + firstElement.getAttribute('id')) if (uploadBox) { uploadBox.focus() } } }) } if (!this.validateGDPRSmsFieldValue(true)) { pass = false } return pass }, clearInvalidFieldByPrecondition: function(fieldName,fieldValue){ // Here I hard code only apply to Territory & State/Province fields if(!fieldName.endsWith('address.territory') && !fieldName.endsWith('address.stateOrProvince')){ return } let fieldName2 = this.filterFieldName(fieldName) for(let f in this.fieldRules){ for(const r of this.fieldRules[f]){ if(r.preconditions.filter((pc) => pc.name===fieldName2 && pc.value !== fieldValue).length>0){ this.invalidField[this.filterPreconditionFieldName(fieldName,f)] = null } } } }, filterPreconditionFieldName: function(fieldName, preconditionName){ if(fieldName && preconditionName){ if(!fieldName.includes('subMembers[') || !preconditionName.includes('subMembers[')){ return preconditionName } let subMemberMatchStr = fieldName.match(/subMembers\[\d+\]/) if(subMemberMatchStr && subMemberMatchStr.length>0) { let indexedPreconditionName = preconditionName.replace('subMembers[index]', subMemberMatchStr[0]) return indexedPreconditionName } } return preconditionName }, filterFieldName: function(fieldName){ if(fieldName) { fieldName = fieldName.replace(/subMembers\[\d+\]/, 'subMembers[index]') } return fieldName }, validateField: function(element,value) { let fieldName = element.getAttribute('name') let fieldRules = this.fieldRules[this.filterFieldName(fieldName)] if (!fieldRules) { return true } let valid = true let fieldVal = value.toString() if( element.getAttribute('type') === 'file' && value[0].name === ''){ fieldVal = '' } element.getAttribute('type') this.invalidField[fieldName] = null for (let vt of fieldRules) { let preconditionNotHit = false for (let precondition of vt.preconditions) { let preconditionFieldName = this.filterPreconditionFieldName(fieldName, precondition.name) if (precondition !== null && this.getFormData().get(preconditionFieldName) !== precondition.value) { preconditionNotHit = true break } } if (preconditionNotHit) { continue } if(Validator[vt.rule].check(fieldVal,vt.extra)){ if(this.invalidField[fieldName]===null){ this.invalidField[fieldName] = [] } this.invalidField[fieldName].push(vt.message) valid = false if(fieldName.startsWith('payment.card.address')){ this.sameAsBillingAddress = false } } } return valid }, onFieldBlur: function (event) { this.checkNameField(event) this.checkSubMemberNameField(event) let val = this.getFormData().getAll(event.target.getAttribute('name')) this.validateField(event.target, val) this.clearInvalidFieldByPrecondition(event.target.getAttribute('name'), val) }, validateZipCode(){ const zipCodeNames = ['account.address.zipCode','payment.card.address.zipCode'] const zipCodeName = this.sameAsBillingAddress ? zipCodeNames[0] : this.paymentType !== 'CARD' ? zipCodeNames[0] : zipCodeNames[1] let zipCode = this.getFormData().get(zipCodeName) // If there is no zipCode for account in the form, use the code from login status if(zipCode === null){ zipCode = this.constituentZipCode } this.ccfpInfo.isCAZipCode = this.caZipCodeList.includes(zipCode) }, setDoubleTheDonation(toHide) { try { let doubleDonationField = document.getElementById('dd-company-name-input') let parentContainer = doubleDonationField.parentNode if (toHide) { parentContainer.style.display = 'none' } else { parentContainer.style.display = '' } } catch (e) { console.log('change the display css of double donation field error', e) } }, checkAsCompanyField(event) { try { if ('DONATION' !== this.formType) { return } let fieldId = event.target.getAttribute('id') if (fieldId && 'account.asCompany' === fieldId) { let val = this.getFormData().getAll(event.target.getAttribute('name')) if (val && 'true' === val[0]) { this.setDoubleTheDonation(true) } else { this.setDoubleTheDonation(false) } } } catch (e) { console.log('validate as company name field error', e) } }, setSmsPhoneNumberField(toHide) { try { let fileLabelId = "account.gdpr.smsPhoneNumber.label" let fileId = "account.gdpr.smsPhoneNumber" let fileRequiredToolTipId = "account.gdpr.smsPhoneNumber.requiredTooltip" let fileInvalidToolTipId = "account.gdpr.smsPhoneNumber.invalidTooltip" if (fileId) { let smsPhoneNumberFieldLabel = document.getElementById(fileLabelId) let smsPhoneNumberField = document.getElementById(fileId) let smsPhoneNumberFieldRequiredToolTip = document.getElementById(fileRequiredToolTipId) let smsPhoneNumberFieldInvalidToolTip = document.getElementById(fileInvalidToolTipId) if (smsPhoneNumberFieldLabel && smsPhoneNumberField) { if (toHide) { smsPhoneNumberFieldLabel.style.display = 'none' smsPhoneNumberField.style.display = 'none' smsPhoneNumberField.style.borderColor = '#ced4da' if (smsPhoneNumberFieldRequiredToolTip) { smsPhoneNumberFieldRequiredToolTip.style.display = 'none' } if (smsPhoneNumberFieldInvalidToolTip) { smsPhoneNumberFieldInvalidToolTip.style.display = 'none' } } else { smsPhoneNumberFieldLabel.style.display = '' smsPhoneNumberField.style.display = '' } } } } catch (e) { console.log('change the display css of sms number field error', e) } }, linkagePhone1WithSmsPhoneNumber(event) { try { let smsConsentFieldId = "account.gdpr.sms" let smsPhoneNumberFieldId = "account.gdpr.smsPhoneNumber" let fieldId = event.target.getAttribute('id') if (smsConsentFieldId && smsPhoneNumberFieldId && fieldId && smsConsentFieldId === fieldId) { let smsPhoneNumberField = document.getElementById(smsPhoneNumberFieldId) let phone1 let smsPhoneNumber = smsPhoneNumberField ? smsPhoneNumberField.value : null if ('ACCOUNT' === this.formType) { phone1 = this.formData.address.phone1.number } else { phone1 = this.formData.account.address.phone1.number } if (phone1 && phone1.trim() !== '' && (!smsPhoneNumber || smsPhoneNumber.trim() === '')) { smsPhoneNumberField.value = phone1 this.validateGDPRSmsFieldValue(false) } } } catch (e) { console.log('linkage phone1 with sms phone number error', e) } }, validateGDPRSmsFieldValue(needFocus) { try { let fileId = "account.gdpr.smsPhoneNumber" let gdprSmsFieldId = "account.gdpr.sms" let fileRequiredToolTipId = "account.gdpr.smsPhoneNumber.requiredTooltip" let fileInvalidToolTipId = "account.gdpr.smsPhoneNumber.invalidTooltip" if (fileId && gdprSmsFieldId) { let smsPhoneNumberField = document.getElementById(fileId) let smsPhoneNumberRequiredFieldToolTip = document.getElementById(fileRequiredToolTipId) let smsPhoneNumberInvalidFieldToolTip = document.getElementById(fileInvalidToolTipId) let val = this.getFormData().getAll(gdprSmsFieldId) let isInvalid = false let isRequired = false if (smsPhoneNumberField && val) { if ('true' === val[0]) { let smsPhoneNumberValue = smsPhoneNumberField.value if (smsPhoneNumberValue && smsPhoneNumberValue.trim() !== '') { let usPhoneReg = /^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/ if (!usPhoneReg.test(smsPhoneNumberValue.replaceAll(' ', '').replaceAll('-', '').replaceAll('\\(', '').replaceAll('\\)', ''))) { isInvalid = true } } else { isRequired = true } } } if(smsPhoneNumberField && this.isNeedValidateGDPRSmsField(smsPhoneNumberField)){ if (isInvalid) { smsPhoneNumberField.style.borderColor = '#dc3545' if (smsPhoneNumberInvalidFieldToolTip) { smsPhoneNumberInvalidFieldToolTip.style.fontSize = '0.75rem' smsPhoneNumberInvalidFieldToolTip.style.width = '100%' smsPhoneNumberInvalidFieldToolTip.style.marginTop = '.25rem' smsPhoneNumberInvalidFieldToolTip.style.fontFamily = 'Lato' smsPhoneNumberInvalidFieldToolTip.style.color = '#DC143C' smsPhoneNumberInvalidFieldToolTip.style.display = '' } } else { if (smsPhoneNumberInvalidFieldToolTip) { smsPhoneNumberInvalidFieldToolTip.style.display = 'none' } } if (isRequired) { smsPhoneNumberField.style.borderColor = '#dc3545' if (smsPhoneNumberRequiredFieldToolTip) { smsPhoneNumberRequiredFieldToolTip.style.fontSize = '0.75rem' smsPhoneNumberRequiredFieldToolTip.style.width = '100%' smsPhoneNumberRequiredFieldToolTip.style.marginTop = '.25rem' smsPhoneNumberRequiredFieldToolTip.style.fontFamily = 'Lato' smsPhoneNumberRequiredFieldToolTip.style.color = '#DC143C' smsPhoneNumberRequiredFieldToolTip.style.display = '' } } else { if (smsPhoneNumberRequiredFieldToolTip) { smsPhoneNumberRequiredFieldToolTip.style.display = 'none' } } if (isInvalid || isRequired) { if (needFocus) { smsPhoneNumberField.focus() } return false } else { smsPhoneNumberField.style.borderColor = '#ced4da' } } } return true } catch (e) { console.log('validate GDPR sms field value error', e) return true } }, isNeedValidateGDPRSmsField(element) { let parentElement = element.parentNode; while (parentElement) { const parentId = parentElement.id; if (parentId.startsWith('neon-page-')) { return parentElement.style.display !== 'none'; } parentElement = parentElement.parentNode; } return false }, checkGDPRSmsField(event) { try { let fieldId = event.target.getAttribute('id') let gdprSmsFieldId = "account.gdpr.sms" if (gdprSmsFieldId && fieldId && gdprSmsFieldId === fieldId) { let val = this.getFormData().getAll(event.target.getAttribute('name')) if (val && 'true' === val[0]) { this.setSmsPhoneNumberField(false) } else { this.setSmsPhoneNumberField(true) } } } catch (e) { console.log('validate gdpr sms field error', e) } }, checkSubMemberNameField(event) { if ('MEMBERSHIP' !== this.formType && 'SUB_MEMBER' !== this.formType) { return } try { let firstNamePro = 'account.name.firstName' let preferredNamePro = 'account.name.preferredName' let fieldId = event.target.getAttribute('id') if (!fieldId || fieldId.indexOf('subMembers') < 0) { return; } if (fieldId.indexOf(firstNamePro) < 0 && fieldId.indexOf(preferredNamePro) < 0) { return; } let subMemberIndex let firstNameReg = /subMembers\[(.*)\].account.name.firstName/g let result = firstNameReg.exec(fieldId) if (result && result.length > 0 && result[1] !== null) { subMemberIndex = Number(result[1]) } let preferredNameReg = /subMembers\[(.*)\].account.name.preferredName/g result = preferredNameReg.exec(fieldId) if (result && result.length > 0 && result[1] !== null) { subMemberIndex = Number(result[1]) } firstNamePro = 'subMembers[' + subMemberIndex + '].' + firstNamePro preferredNamePro = 'subMembers[' + subMemberIndex + '].' + preferredNamePro let firstNameField = document.getElementById(firstNamePro) let preferredNameField = document.getElementById(preferredNamePro) if (!preferredNameField || !firstNameField) { return } let firstName = this.formData.subMembers[subMemberIndex].account.name.firstName let preferredName = this.formData.subMembers[subMemberIndex].account.name.preferredName if ((!preferredName || preferredName.replaceAll(' ', '') === '') && firstName && firstName.replaceAll(' ', '') !== '') { this.formData.subMembers[subMemberIndex].account.name.preferredName = firstName preferredNameField.value = firstName this.validateField(preferredNameField, firstName) } } catch (e) { console.log('validate sub member name field error', e) } }, checkNameField(event) { try { let firstNamePro = 'account.name.firstName' let preferredNamePro = 'account.name.preferredName' if ('ACCOUNT' === this.formType) { firstNamePro = 'name.firstName' preferredNamePro = 'name.preferredName' } let fieldId = event.target.getAttribute('id') if (fieldId && (fieldId === firstNamePro || fieldId === preferredNamePro)) { this.processNameField(firstNamePro, preferredNamePro) } } catch (e) { console.log('validate name field error', e) } }, processNameField(firstNamePro, preferredNamePro) { try { let firstNameField = document.getElementById(firstNamePro) let preferredNameField = document.getElementById(preferredNamePro) if (!preferredNameField || !firstNameField) { return } let firstName let preferredName if ('ACCOUNT' === this.formType) { firstName = this.formData.name.firstName preferredName = this.formData.name.preferredName } else { firstName = this.formData.account.name.firstName preferredName = this.formData.account.name.preferredName } if ((!preferredName || preferredName.replaceAll(' ', '') === '') && firstName && firstName.replaceAll(' ', '') !== '') { if ('ACCOUNT' === this.formType) { this.formData.name.preferredName = firstName } else { this.formData.account.name.preferredName = firstName } preferredNameField.value = firstName this.validateField(preferredNameField, firstName) } } catch (e) { console.log('process name field error', e) } }, onFieldChange: function (event) { this.checkAsCompanyField(event) this.linkagePhone1WithSmsPhoneNumber(event) this.checkGDPRSmsField(event) }, onFileCustomUploaded: function (resp) { if (resp.obj.success) { this.tempFileDirUUid = resp.obj.data.uuid this.$nextTick(function () { let el = document.getElementById(resp.key) el.value = resp.obj.data.tempPath let elVal = this.getFormData().getAll(resp.key) this.validateField(el, elVal) }) } }, onRemoveCustomFile: function (obj) { this.$nextTick(function () { let el = document.getElementById(obj.key) el.value = '' let elVal = this.getFormData().getAll(obj.key) this.validateField(el, elVal) }) }, getDefaultCustomFile: function (fileInfo) { if (fileInfo) { let infos = fileInfo.split(':') if (infos.length > 1) { return [{name: infos[0], size: infos[1]}] } } return [] }, unsupportedFileType:function (fileName) { const SUPPORTED_FILE_TYPES = ['mobi', 'km', 'me', 'ppk ', 'jtl', 'dat', 'one', 'kdc', 'stl', 'midi', 'png', 'thmx', 'conf', 'pnm', 'mht', 'dwg', 'mj2', 'xroles', 'onepkg', 'csv', 'jar', 'exr', 'exp', 'fh50', 'crw', 'srf', 'scala', 'aifc', 'slddrw', 'ecelp7470', 'aiff', 'jb2', 'iso19139', 'css', 'perl', 'f90', 'fh40', 'am', 'amr', 'f77', 'as', 'au', 'mef', 'sql', 'pkg', 'bpg', 'ad', 'ac', 'dtd', 'bash', 'dts', 'heif', 'junit', 'al', 'bpm', 'properties', 'kar', 'aj', 'bpk', 'heic', 'mli', 'sxi', 'sxw', 'webp', 'html', 'idl', 'data', 'mmpt', 'jfi', 'pro', 'mp4v', 'xbm', 'psd', 'mhtml', 'icb', 'mkd', 'asx', 'cs', 'rw2', 'mp4a', 'mkv', 'ics', 'webm', 'ico', 'cc', 'cxx', 'sxc', 'sxd', 'cl', 'ppj', 'arw', 'rtf', 'svg', 'lha', 'pps', 'txt', 'flac', 'ppm', 'ppz', 'ft12', 'ft11', 'asm', 'ft10', 'lhs', 'ppt', 'asf', 'r3d', 'xsamples', 'mka', 'asp', 'htaccess', 'groovy', 'mmmp', 'mid', 'abs-menulinks', 'g3', 'pod', 'dxf', 'rst', 'dxb', 'pom', 'mp2a', 'pot', 'jfif', 'el', 'ppa', 'ft', 'mjp2', 'pict', 'mpg', 'fv', 'nrw', 'mpt', 'mpp', 'xmind', 'fbs', 'fh', 'mpx', 'wdb', 'sldasm', 'mime', 'fn', 'gv', 'vsdm', 'markdown', 'jif', 'xdp', 'distz', 'ost', 'mos', 'diff', 'install', 'mov', 'mpe', 'wcm', 'zip', 'i3', 'vsdx', 'go', 'mng', 'sldprt', 'roles', 'ifb', 'hx', 'mp3', 'mp4', 'wax', 'xweb', 'mp2', 'wav', 'npx', 'fb2', 'ptx', 'awk', 'hh', 'mod', 'hs', 'xfdf', 'hp', 'ief', 'mmr', 'mmp', 'pst', 'xcf', 'ig', 'rest', 'avi', 'rwz', 'orf', 'in', 'xlog', 'jx', 'fff', 'list', 'lrm', 'fh4', 'fh5', 'dwfx', 'm2v', 'jp2', 'sldm', 'mdtext', 'jbig2', 'm3a', 'potm', 'fh8', 'jpgm', 'fh9', 'jl', 'fh7', 'sldx', 'coffee', 'xargs', 'jpgv', 'js', 'pptx', 'msp', 'owl', 'xht', 'm1v', 'mst', 'pyv', 'xif', 'jmx', 'm4', 'lisp', 'm3', 'jng', 'lrf', 'm2a', 'ppsx', 'pxn', 'vcs', 'keys', 'icns', 'mrw', 'md', 'vda', 'jpeg', 'xcat', 'mb', 'ma', 'wsdd', 'mg', 'mf', 'pya', 'pptm', 'ecelp9600', 'xltx', 'msi', 'xltm', 'n3', 'msg', 'rexx', 'epub', 'kml', 'opus', 'log', 'dotm', 'nb', 'iiq', 'readme', 'xlsb', 'ml', 'dotx', 'kmz', 'vcf', 'ppsm', 'xlsx', 'haml', 'xlsm', 'ntf', 'mxu', 'raw', 'lvp', 'tex', 'ras', 'config', 'cdr', 'bibtex', 'xquery', 'movie', 'project', 'makefile', 'aac', 'adoc', 'text', '3fr', 'cwiki', 'xlz', 'def', 'ocaml', 'smil', 'h263', 'h261', 'h264', 'ipa', 'bay', 'xmp', 'bau', 'xml', 'raf', 'bas', 'bat', 'rar', 'viv', 'ram', 'wks', 'scm', '3g2', 'jpm', 'ini', 'sas', 'vhd', 'xlf', 'json', 'inx', 'xld', 'xwelcome', 'k25', 'm4u', 'xlc', 'm4v', 'xla', 'xhtml', 'cbl', 'btif', 'xll', 'lua', 'pm', 'xlm', 'pl', 'pp', 'xlw', 'xlt', 'xlr', 'xls', 'py', 'ra', 'abs-linkmap', 'caf', 'h++', 'lsp', 'cab', 'gif', 'rb', 'ims', 'm3u', 'potx', 'dcl', 'm4a', 'mseq', 'm4b', 'dcx', 'cat', 'qt', 'dcs', 'jpf', 'jpg', 'fhc', 'jpe', 'tcl', 'chm', 'dist', 'wpl', 'sh', 'djv', 'ads', 'adp', 'wps', 'pbm', 'php3', 'oxps', 'shw', 'wbmp', 'emf', 'aspx', 'cgm', 'dtshd', 'cgi', 'tk', 'tif', 'mpeg', 'lzh', 'so', 'mpg4', 'st', 'pas', 'itk', 'less', 'ada', 'adb', 'elc', 'cfm', 'hpp', 'xgrm', 'cfg', 'flv', 'asnd', 'xps', 'rdf', 'nitf', 'xpm', 'restx', 'dif', 'dib', 'wma', 'cfml', 'jsp', 'vm', 'sed', 'classpath', 'wmf', 'tga', 'ihtml', 'j2c', 'wmx', 'fli', 'cfc', 'wmv', '3gp', 'flc', 'ft8', 'sfdu', 'ft9', 'ft7', 'java', 'wm', 'odf', 'xlam', 'cmd', 'doc', 'ppam', 'patch', 'docm', 'aif', 'odt', 'xegrm', 'dms', 'eot', 'x3f', 'bin', 'pef', 'vstx', 'xq', 'meta', 'ibooks', 'pen', 'clj', 'nar', 'dng', 'applescript', 'ent', 'xmap', 'pcx', 'pdf', 'fpx', 'vssx', 'tld', 'vstm', 'bib', 'manifest', 'tiff', 'eol', 'c++', 'dump', 'xsd', 'for', 'cil', 'mpga', 'eml', 'emz', 'php4', 'types', 'xsl', 'djvu', 'rgb', 'mmas', 'vssm', 'mmat', 'asciidoc', 'mmap', 'xsp', 'grm', 'pct', 'htm', 'xlex', 'mdb', 'rng', '4th', 'f4v', 'etx', 'asice', 'rnc', 'fvt', 'yaml', 'mdi', 'sr2', 'spx', 'deploy', 'vhdl', 'rnx', 'c', 'pic', 'd', 'e', 'f', 'oga', 'g', 'xliff', 'ecelp4800', 'h', 'bmp', 'l', 'm', 'rmi', 'p', 'ogg', 'nef', 'r', 's', 'asics', 'drf', 'v', 'svgz', 'y', 'rmp', 'drc', 'ogm', 'cr2', 'cpp', 'ogv', 'egrm', 'hxx', 'snd', 'rlc', 'fh12', 'dpr', 'fh11', 'fh10', 'aart', 'dpx', 'php', 'wvx', 'vtt', 'cob', 'xconf', 'dot', 'vsd', 'fst', 'docx', 'xwd', 'sml', 'cmx', 'smi', 'vsl', 'vsw', 'erf', 'vss', 'pgm', 'vst', 'erl'] if (fileName.indexOf('.') > -1) { let type = fileName.substring(fileName.lastIndexOf('.') + 1) return SUPPORTED_FILE_TYPES.indexOf(type.toLowerCase()) < 0 } return false }, div: function (arg1, arg2) { arg1 = parseFloat(arg1); arg2 = parseFloat(arg2); var t1 = 0, t2 = 0, r1, r2; try { t1 = arg1.toString().split(".")[1].length; } catch (e) { } try { t2 = arg2.toString().split(".")[1].length; } catch (e) { } r1 = Number(arg1.toString().replace(".", "")); r2 = Number(arg2.toString().replace(".", "")); return this.Mul(r1 / r2, Math.pow(10, t2 - t1)); }, Mul: function (arg1, arg2) { arg1 = parseFloat(arg1); arg2 = parseFloat(arg2); var m = 0, s1 = arg1.toString(), s2 = arg2.toString(); try { m += s1.split(".")[1].length } catch (e) { } try { m += s2.split(".")[1].length } catch (e) { } return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m); }, getLoginName: function(){ axios.post('/nx/portal/constituent/getLoginName').then(response => { this.formData.newLoginName = response.data.data }).catch(error => { if(error.response.data){ this.errors = error.response.data console.log('error: ',error) } }) }, validateCurrentPassword: function (event) { let val = this.getFormData().getAll(event.target.getAttribute('name')) this.validateField(event.target, val) this.sendCurrentPasswordToServer(this.getNeonFormJson()) }, changePasswordType(event){ const pid = event.target.getAttribute('pid') const eyeId = pid + '_eye' const input = document.getElementById(pid) const eyesIcon = document.getElementById(eyeId) if (input.type === "password"){ input.type = "text" eyesIcon.setAttribute( 'class', 'fa fa-eye neon-password-eye-icon' ) } else { input.type = "password" eyesIcon.setAttribute( 'class', 'fa fa-eye-slash neon-password-eye-icon' ) } }, sendCurrentPasswordToServer: function(neonFormData){ neonFormData.hiddenFields = this.hiddenFields axios.post('/nx/portal/constituent/checkCurrentPassword', neonFormData).then(response => { }).catch(error => { if(error.response.data){ this.errors = error.response.data let fields = {} this.errors.forEach(function(e){ if(e.type==='GLOBAL'){ }else { if (fields[e.field] === undefined) { fields[e.field] = [] } fields[e.field].push(e.message) } }) this.invalidField['oldPassword'] = fields['oldPassword'] } }) }, checkFieldInvalid: function (fieldName) { if (this.invalidField[fieldName]) { return true } return false }, validateBeforeSubmit() { if (!this.validateGDPRSmsFieldValue(true)) { return false } // validate current page if (this.validatePage(this.currentPage)) { return true } return false }, submitNeonForm: function (event,ach) { if(this.previewMode){ alert('Preview Mode') return } if(!this.validateBeforeSubmit()){ return } if(!this.neonPayEnable) { if(this.paymentType==='ACH' && ach===undefined){ let achConfirmModal = bootstrap.Modal.getInstance(document.getElementById('achConfirmModal')) achConfirmModal.show() return }else if(this.paymentType==='ACH' && ach){ let achConfirmModal = bootstrap.Modal.getInstance(document.getElementById('achConfirmModal')) achConfirmModal.hide() } this.errors = [] this.invalidField = {} if(this.googleReCaptchaEnabled){ this.validateReCaptcha() }else{ this.submitting = true this.invokePrepareSendToServer() } } else { this.errors = [] this.invalidField = {} if(ach) { this.submitting = true this.invokePrepareSendToServer(ach) } else { if(this.googleReCaptchaEnabled){ this.validateReCaptcha(ach) }else{ this.submitting = true this.invokePrepareSendToServer(ach) } } } }, invokePrepareSendToServer: function(ach){ const neonFormJson = this.getNeonFormJson() this.prepareSendToServer(neonFormJson, ach) }, prepareSendToServer: function(neonFormData){ // You can override this method If you want do something before send to server this.sendToServer(neonFormData) }, validateReCaptcha:function (ach) { if(window.grecaptcha) { if(this.isEnableVisibleReCaptcha){ if(this.recaptchaResponse !== null){ this.submitting = true this.isReCaptchaPassed = true; let neonFormData = this.getNeonFormJson() neonFormData.recaptchaResponse = this.recaptchaResponse this.prepareSendToServer(neonFormData, ach) }else{ this.globalError = 'reCAPTCHA verification failed.'; app.$nextTick(function(){ document.getElementById('globalError').scrollIntoView() }) this.isReCaptchaPassed = false; } }else{ this.recaptchaResponse = null window.grecaptcha.execute() } } else { this.submitting = true this.invokePrepareSendToServer(ach) } }, sendToServer: function(neonFormData){ if(this.selectEditTerm) { neonFormData.membershipTermId = this.selectEditTerm.id } let url = "\/nx\/portal\/donation-form" if(url && url.indexOf('/membership-form') > -1 && (!neonFormData.subMemberChecked || neonFormData.subMemberChecked && neonFormData.subMemberChecked !== 'true') && neonFormData.subMembers) { delete neonFormData.subMembers } neonFormData.hiddenFields = this.hiddenFields axios.post("\/nx\/portal\/donation-form", neonFormData).then(response => { console.info(response) try { if (window.doublethedonation && response.data.extraParameters.donationStatus === 'SUCCEEDED') { sessionStorage.dtdCompanyId = neonFormData.doublethedonation_company_id } } catch (e) { console.error(e) } if (this.paymentType === 'PAYPAL' && this.totalAmount > 0.0) { this.paypal = response.data.paypalFormRequest this.$nextTick(function () { console.log('redirects to paypal'); document.getElementById('paypal_xclick').submit(); }) } else { // tell the pop button iframe close try { let doubleDonationInvalid = 'DONATION' !== this.formType || (response.data && response.data.extraParameters && response.data.extraParameters.isCompanyDonor) if (this.popDomainUrl && this.hideTheme && this.hideTheme === '1' && (doubleDonationInvalid || !window.doublethedonation)) { let data = {target: 'closeModal', data: true} parent.postMessage(data, this.popDomainUrl) } } catch (ignore) { } let dafNonIntegration = response.data.exitPageResponse.extraParameters && response.data.exitPageResponse.extraParameters.nonIntegration if (this.customExitPage && this.customExitPageUrl !== null && !dafNonIntegration) { location.href = this.customExitPageUrl } else { let redirectUrl = '/nx/portal/forms/result/' + response.data.exitPageResponse.shareToken if (this.hideTheme && this.hideTheme === '1') { redirectUrl += '?hideTheme=1' } if(response.data && response.data.originalUrl){ redirectUrl += '?originalUrl=' + encodeURIComponent(response.data.originalUrl) } location.href = redirectUrl } this.success = true this.submitting = false this.success = true } }).catch(error => { this.catchError(error) }) }, checkWithoutPayment: function() { if(this.withoutPayment){ if(this.currentPage === 2){ this.submitFormWithoutPayment() return true } } return false }, submitFormWithoutPayment: function(){ if (this.validatePage(this.currentPage)) { console.info('Redirect to payment...') this.submitting = true var neonFormJson = this.getNeonFormJson(); neonFormJson.withoutPayment = true neonFormJson.withoutPaymentParentUrl = this.withoutPaymentParentUrl axios.post("\/nx\/portal\/donation-form", neonFormJson).then(response => { console.info(response) this.redirectingToPayment = true this.paymentRequestId = response.data setTimeout(() => { document.getElementById('redirectToPaymentForm').submit() },2000) }).catch(this.catchError) } }, catchError: function(error){ this.submitting = false if(this.paymentType) { if (this.paymentType === 'DAF') { this.payPal = false this.card = false this.ach = false this.payLater = false }else{ this.dafPay = false } } if(error.response && error.response.data){ this.errors = error.response.data let fields = {} let globalMessage='' let created= false this.errors.forEach(function(e){ if(e.type==='GLOBAL'){ globalMessage = e.message if(e.code==='E-0020'){ created = true } else if(e.code === 'E-0021' && globalMessage){ document.location.href = globalMessage } app.$nextTick(function(){ document.getElementById('globalError').scrollIntoView() }) }else { if (fields[e.field] === undefined) { fields[e.field] = [] } fields[e.field].push(e.message) } }) this.invalidField = fields this.globalError = globalMessage if(created) { this.created = created this.payLater = false } if(this.globalError =='' && Object.keys(this.invalidField).length>0){ this.globalError='Some field is invalid, please check the form' } if(this.onSubmitError){ this.onSubmitError(this.globalError) } } console.error(error.response) }, getFormData:function(){ return new FormData(document.getElementById('neonform_4')) }, getNeonFormJson(){ return JSON.form('neonform_4') }, initDateField:function (){ this.$nextTick(function(){ for(let f of this.dateFields){ this.renderLayDate(f) } }) // currentLoginName this.getLoginName() }, renderLayDate: function(f){ let format = f.fieldType==='DATE'?'MM/dd/yyyy':'HH:mm:ss' let type = f.fieldType==='DATE'?'date':'time' let elem = document.getElementById(f.fieldName) laydate.render({ elem: elem, lang: 'en', type: type, format: format, ready: function (value){ app.validateField(elem,elem.value) }, done:function(value){ setObjectValueByPath('app.formData',f.fieldName,value) app.validateField(elem,value) } }); }, changePaymentType: function(type){ if(this.submitting){ return } this.paymentType=type }, reCaptchaInit: function () { this.reCaptchaPlaceholder() }, reCaptchaPlaceholder: function () { if(this.isEnableVisibleReCaptcha){ let tagArr = document.getElementsByName("name:reCaptcha"); tagArr.forEach(tag => { let timer = setInterval(() => { if(window.grecaptcha){ window.grecaptcha.render(tag,{ sitekey: '6LerUSscAAAAABvvEeo9zpqVYshHv-ncy2l0kHQL', callback: ($token) => { this.recaptchaResponse = $token // remove error messages this.globalError = ''; }, 'expired-callback' : () => { // expired this.recaptchaResponse = null; }, }); clearInterval(timer); } },500); }) }else{ window.ReCaptchaLoaded = this.reCaptchaCallback; let tag = document.createElement("div") tag.className = 'g-recaptcha' tag.setAttribute('data-sitekey', '6LerUSscAAAAABvvEeo9zpqVYshHv-ncy2l0kHQL') tag.setAttribute('data-callback', 'ReCaptchaLoaded') tag.setAttribute('data-size', 'invisible') document.body.appendChild(tag); } }, reCaptchaCallback: function ($token) { this.recaptchaResponse = $token if(window.grecaptcha) { window.grecaptcha.reset() } this.submitting = true let neonFormData = this.getNeonFormJson() neonFormData.recaptchaResponse = $token this.prepareSendToServer(neonFormData) }, isprofilePhotoChange: function () { this.isProfilePhoto = true }, closeprofilePhoto: function () { this.isProfilePhoto = false }, profilePhotoChange: function(e){ let file = e.target.files[0] if(file){ if(file.type!=='image/png' && file.type!=='image/gif' && file.type!=='image/jpeg'){ alert('Please choose jpg/gif/png format picture.') this.resetProfilePhoto() return } const fileSize = file.size const isLt10M = fileSize/1024 < 500 if (!isLt10M) { alert('The uploaded photo size cannot exceed 500KB.') file = '' this.resetProfilePhoto() return } this.profilePhoto.entity = file let fr = new FileReader(); fr.readAsDataURL(file) fr.onload = function(e){ // if(e.target.result.startsWith('data:image/')) { // app.$data.profilePhoto.url = e.target.result // } app.uploadProfilePhoto() } } }, uploadProfilePhoto: function(cfile) { this.profilePhoto.uploading = true let fileData = new FormData(); if(cfile){ fileData.append('file',cfile,'file') }else { fileData.append('file',this.profilePhoto.entity,'file') } axios.post('/nx/portal/constituent/profile/photo',fileData,{ headers: { 'Content-Type': 'multipart/form-data' } }).then(response => { this.profilePhoto.uploading = false this.profilePhoto.url = response.data.imgUrl + '?t=' + new Date().getTime() this.profilePhoto.approved = response.data.approved this.profilePhoto.entity = null if(!cfile){ this.resetProfilePhoto() } }).catch(error => { console.log(error.response) this.profilePhoto.uploading = false this.profilePhoto.entity = null if(!cfile){ this.resetProfilePhoto() } alert('Upload fail, please try again.') }) }, deleteProfilePhoto: function () { if(!window.confirm('Are you sure you want to delete this photo?')){ return } // delete server this.profilePhoto.deleting = true axios.delete('/nx/portal/constituent/profile/photo').then(response => { this.profilePhoto.deleting = false this.profilePhoto.url = null this.profilePhoto.approved = null this.profilePhoto.entity = null }).catch(error => { console.log(error.response) this.profilePhoto.deleting = false alert('Delete fail, please try again.') }) }, resetProfilePhoto: function() { this.$nextTick(function (){ document.getElementById('account-profile-photo').value='' }) }, getSocialMediaIcon: function (name, style) { if (style === 'D') { return '/nx/static/img/icons/social-media/darkicons/' + name + '.svg' } else { return '/nx/static/img/icons/social-media/lighticons/' + name + '.svg' } }, onAmountKeyPress: function(event){ let keyCode = String.fromCharCode(event.keyCode) if(keyCode==='+' || keyCode==='-' || keyCode.toLowerCase()==='e'){ event.preventDefault() return false } return true }, formatAmount: function (number) { return Formatter.numberFormat(number, 2, this.formCurrency.sign) }, formatAmountWithoutCurrency: function(number){ return Formatter.numberFormat(number, 2, '') }, doBindSubmitBtnTooltip: function (tooltip){ this.$nextTick(() => { const submitNeedDisabledButtons = document.getElementsByName('submitBtn') if(submitNeedDisabledButtons.length > 0){ [...submitNeedDisabledButtons].map(submitBtn => { submitBtn.setAttribute('data-bs-placement','top') submitBtn.setAttribute('data-bs-title',tooltip) submitBtn.setAttribute('data-bs-toggle','tooltip') submitBtn.style.pointerEvents = 'auto' new bootstrap.Tooltip(submitBtn) }) } }) }, initTooltip: function () { this.$nextTick(function () { setTimeout(() => { let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) let tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl, {container: 'body'}) }) }, 700) }) }, } const appComputed = { profilePhotoStatus: function (){ return this.profilePhoto.url!==null && !this.profilePhoto.url.startsWith('data:image/') }, showSubmitBtn: function () { return (this.paymentType === 'CARD' && !this.submitting && this.showCardFields) || (this.paymentType === 'ACH' && !this.submitting) }, formCurrencySignClass: function() { switch (this.formCurrency.sign){ case '$': return {'fa-dollar-sign':true} case '€': return {'fa-euro-sign':true} case '£': return {'fa-pound-sign':true} default: return {'fa-dollar-sign':true} } }, asCompany: function () { if (this.formData.account && this.formData.account.asCompany) { return this.formData.account.asCompany } else if (this.formData.asCompany) { return this.formData.asCompany } return null }, disableSubmitButton: function (){ if(this.previewMode){ return true } if(!this.ccfpInfo.nonCaOrgNotInGood){ return false } const result = this.paymentType === 'CARD' && this.ccfpInfo.isCAZipCode this.doBindSubmitBtnTooltip(result ? this.ccfpInfo.notInGoodMessage : '') return result }, showAchMessage: function (){ if(this.previewMode){ return true } if(!this.ccfpInfo.nonCaOrgNotInGood){ return true } return !this.ccfpInfo.isCAZipCode }, showSummary: function(){ if(this.previewMode){ return true } if(this.ccfpInfo.notInGood){ return false } if(this.paymentType !== 'ACH' && this.paymentType !== 'DAF'){ return true } return this.showAchMessage }, showPayment: function (){ if(this.previewMode){ return true } return !this.ccfpInfo.notInGood }, showSameAsBillingAddress: function () { if (this.formData.account && this.formData.account.address) { if(this.formData.account.address.line1!==undefined){ return true } if(this.formData.account.address.line2!==undefined){ return true } if(this.formData.account.address.country!==undefined){ return true } if(this.formData.account.address.city!==undefined){ return true } if(this.formData.account.address.stateOrProvince!==undefined){ return true } if(this.formData.account.address.zipCode!==undefined){ return true } } return false }, addressLine1: function(){ if (this.formData.account && this.formData.account.address && this.formData.account.address.line1) { return this.formData.account.address.line1.line1 } return '' }, addressLine2: function(){ if(this.formData.account && this.formData.account.address) { return this.formData.account.address.line2 } return '' }, addressCountry: function(){ if(this.formData.account && this.formData.account.address) { return this.formData.account.address.country } return '' }, addressCity: function(){ if(this.formData.account && this.formData.account.address) { return this.formData.account.address.city } return '' }, addressStateOrProvince: function(){ if (this.formData.account && this.formData.account.address) { return this.formData.account.address.stateOrProvince } return '' }, addressZipCode: function () { if (this.formData.account && this.formData.account.address) { return this.formData.account.address.zipCode } return '' }, firstName: function () { if (this.formData.account && this.formData.account.name) { return this.formData.account.name.firstName } return '' }, lastName: function () { if (this.formData.account && this.formData.account.name) { return this.formData.account.name.lastName } return '' }, email: function () { if (this.formData.account && this.formData.account.email1) { return this.formData.account.email1 } return '' }, phone1: function () { if (this.formData.account && this.formData.account.address && this.formData.account.address.phone1) { return this.formData.account.address.phone1.number } return '' } } const appWatch ={ asCompany: function(val){ let account; if(this.formData.account){ account = this.formData.account }else{ account = this.formData } if(account.address){ for(let i=1;i<=3;i++){ if(account.address['phone'+i]){ account.address['phone'+i].type = (val?'W':'H') } } account.address.line1.type = (val ? '2' : '1') } }, sameAsBillingAddress: function(val){ if(val){ this.formData.payment.card.address.line1.line1 = this.addressLine1 this.formData.payment.card.address.line2 = this.addressLine2 this.formData.payment.card.address.country= this.addressCountry this.formData.payment.card.address.city= this.addressCity this.formData.payment.card.address.stateOrProvince= this.addressStateOrProvince this.formData.payment.card.address.zipCode= this.addressZipCode } this.validateZipCode() }, currentPage: function (val){ this.validateZipCode() this.initTooltip() }, addressLine1: function(val){ if(this.sameAsBillingAddress){ this.formData.payment.card.address.line1.line1 = val } if(this.daf) { this.daf.customerDetail.address.line1 = val } }, addressLine2: function(val){ if(this.sameAsBillingAddress){ this.formData.payment.card.address.line2= val } if(this.daf) { this.daf.customerDetail.address.line2 = val } }, addressCountry: function(val){ if(this.sameAsBillingAddress){ this.formData.payment.card.address.country= val } if(this.daf) { this.daf.customerDetail.address.country = window.countryInfos[val] } }, addressCity: function(val){ if(this.sameAsBillingAddress){ this.formData.payment.card.address.city= val } if(this.daf) { this.daf.customerDetail.address.city = val } }, addressStateOrProvince: function (val) { if (this.sameAsBillingAddress) { this.formData.payment.card.address.stateOrProvince = val } if(this.daf) { this.daf.customerDetail.address.state = val } }, addressZipCode: function (val) { if (this.sameAsBillingAddress) { this.formData.payment.card.address.zipCode = val } }, firstName: function (val) { if (this.formData.payment && this.formData.payment.card) { this.formData.payment.card.holderFirstName = val } if (this.formData.payment && this.formData.payment.ach) { this.formData.payment.ach.holderFirstName = val } if(this.daf) { this.daf.customerDetail.firstName = val } }, lastName: function (val) { if (this.formData.payment && this.formData.payment.card) { this.formData.payment.card.holderLastName = val } if (this.formData.payment && this.formData.payment.ach) { this.formData.payment.ach.holderLastName = val } if(this.daf) { this.daf.customerDetail.lastName = val } }, email: function (val) { if (this.formData.payment && this.formData.payment.card) { this.formData.payment.card.holderEmail = val } if (this.formData.payment && this.formData.payment.ach) { this.formData.payment.ach.holderEmail = val } if(this.daf) { this.daf.customerDetail.email = val } }, phone1: function (val) { if(this.daf) { this.daf.customerDetail.phone = val } }, 'formData.payment.card.address.zipCode': function (val){ this.validateZipCode() }, 'formData.account.address.zipCode': function (val){ this.validateZipCode() if(this.daf) { this.daf.customerDetail.address.postalCode = val } }, paymentType: function (val){ this.validateZipCode() if(this.mountDafField){ this.mountDafField() } } } const appConfig = { data: function () { return appData }, methods: appMethods, computed: appComputed, watch: appWatch, mounted: function (){ // Render Laydate this.initDateField() // Init google re captcha if(this.googleReCaptchaEnabled || this.googleReCaptchaEnabled0) { this.reCaptchaInit() } // Invoke other init methods for (let method of this.initMethods) { method.apply(this) } // listening the pop button iframe url try { let that = this window.addEventListener('message', function(e) { let domainUrl = e.data let re = new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'); if (typeof(domainUrl === 'string') && re.test(domainUrl)) { if(!that.popDomainUrl) { that.popDomainUrl = domainUrl } that.withoutPaymentParentUrl = domainUrl } }); } catch (ignore) { } this.initTooltip() }, }