.form {
margin: auto;
}
.form__field {
text-align: left;
margin: 0 !important;
}
.form__fields {
width: 500px;
margin: 0 auto 20px auto;
padding: 0 50px;
}
function getUrlParams() {
var paramMap = {};
if (location.search.length == 0) {
return paramMap;
}
var parts = location.search.substring(1).split("&");
for (var i = 0; i < parts.length; i ++) {
var component = parts[i].split("=");
paramMap [decodeURIComponent(component[0])] = decodeURIComponent(component[1]);
}
return paramMap;
}
var params = getUrlParams();
var ids = ['action', 'nl_events', 'news','daily', 'weekly'];
for (var n = 0; n < ids.length; n++) {
document.getElementById(ids[n]).checked = false;
if (params[ids[n]] == "TRUE" ) {
document.getElementById(ids[n]).checked = true;
} else {
document.getElementById(ids[n]).checked = false;
}
}
if (params['email'] == undefined || params['email'] == "" || params['email'] == "[[S1:primary_email]]") {
document.getElementById("email").value = "";;
} else {
document.getElementById("insert").innerHTML = " for " + params["email"] + "
wrong email?";
document.getElementById("email").value = params["email"];
document.getElementById("email").style.display = "none";
}
if (params['daily'] == "TRUE" || params['weekly'] == "TRUE") {
document.getElementById('gabwrapper').style.display = "inline";
document.getElementById('wgabwrapper').style.display = "inline";
document.getElementById("weekly").style.display = "inline";
document.getElementById("daily").style.display = "inline";
} else {
document.getElementById('gabwrapper').style.display = "none";
document.getElementById('wgabwrapper').style.display = "none";
document.getElementById("weekly").style.display = "none";
document.getElementById("daily").style.display = "none";
}