CBA Organizer Registration
// Special handling for in-app browsers that don’t always support new windows
(function() {
function browserSupportsNewWindows(userAgent) {
var rules = [
‘FBIOS’,
‘Twitter for iPhone’,
‘WebView’,
‘(iPhone|iPod|iPad)(?!.*Safari\/)’,
‘Android.*(wv|\.0\.0\.0)’
];
var pattern = new RegExp(‘(‘ + rules.join(‘|’) + ‘)’, ‘ig’);
return !pattern.test(userAgent);}if (!browserSupportsNewWindows(navigator.userAgent || navigator.vendor || window.opera)) {
document.getElementById(‘af-form-714730461’).parentElement.removeAttribute(‘target’);}})();
jQuery(document).ready(function($){$(‘#awf_field-113005449’).val($(‘#mem-email’).text());});
jQuery(document).ready(function() {
var myfn = document.getElementById(“mem-fn”).innerHTML;
var myln = document.getElementById(“mem-ln”).innerHTML;
var myemail = document.getElementById(“mem-email”).innerHTML;
var myid = document.getElementById(“mem-id”).innerHTML;
if (myfn.length > 0) {
//Logged in
$(“#ebutton”).attr(“href”, “mailto:admin@cbaplan.com?bcc=tom@cbaplan.com&subject=CBA%20Plan%20-%20Financial%20Organizer%20App&body=Hello%2C%20%0A%0APlease%20send%20me%20information%20on%20how%20to%20obtain%20the%20Financial%20Organizer%20App.%20%0A%0AThank%20You.%20%0A%0A%0A%0ACBA%20Plan%20Member%20%0AFirst%20Name%3A” + “%20” + myfn + “%0ALast%20Name%3A” + “%20” + myln + “%0AMember%20Email%3A” + “%20” + myemail + “%0AMember%20ID%3A” + “%20” + myid + “”)
} else{
//not logged in
}});
jQuery(document).ready(function() {
var myfn = document.getElementById(“mem-fn”).innerHTML;
var myln = document.getElementById(“mem-ln”).innerHTML;
var myemail = document.getElementById(“mem-email”).innerHTML;
var myc = document.getElementById(“mem-c”).innerHTML;
var myid = document.getElementById(“mem-id”).innerHTML;
if (myfn.length > 0) {
//Logged in
$(“input[type=’text’][name=’m-fn’]”).val(myfn);
$(“input[type=’text’][name=’m-ln’]”).val(myln);
$(“input[type=’email’][name=’m-e’]”).val(myemail);
$(“input[type=’text’][name=’m-id’]”).val(myid);
$(“input[type=’text’][name=’m-c’]”).val(myc);
} else{
//not logged in
}});
$(document).ready(function() {
$(“.agreeswitch”).click(function() {
$(“.swpm_update_level_to”).submit();
$(“.agreeswitch”).addClass(“select_on”);
localStorage.setItem(‘checkyestoorg’, ‘yes-click’);
});
});
$(document).ready(function(){
if(localStorage.getItem(‘checkyestoorg’) == ‘yes-click’) {
//add class with completed token
$(“.agreeswitch”).addClass(“select_on”);
}
});