work on onboarding

This commit is contained in:
Kevin Froman 2019-10-17 05:00:24 -05:00
parent d034072704
commit 265e2c181b
3 changed files with 34 additions and 14 deletions

View file

@ -4,5 +4,23 @@ fetch('/getnewkeys', {
}})
.then((resp) => resp.text()) // Transform the data into text
.then(function(resp) {
keys = keys.split('')
})
keys = resp.split('')
})
function getCheckValue(elName){
return document.getElementsByName(elName)[0].checked
}
document.getElementById('onboardingForm').onsubmit = function(e){
submitInfo = {}
submitInfo.massSurveil = getCheckValue('state')
submitInfo.stateTarget = getCheckValue('stateTarget')
submitInfo.localThreat = getCheckValue('local')
submitInfo.networkContrib = getCheckValue('networkContribution')
submitInfo.plainContrib = getCheckValue('networkContributionPlain')
submitInfo.donate = getCheckValue('donate')
submitInfo.deterministic = getCheckValue('useDeterministic')
submitInfo.mail = getCheckValue('useMail')
e.preventDefault()
}