|
|
@ -21,12 +21,22 @@ process.nextTick(function() {
|
|
|
|
if (input_email && input_email.value) {
|
|
|
|
if (input_email && input_email.value) {
|
|
|
|
var is_valid = check_email(input_email.value)
|
|
|
|
var is_valid = check_email(input_email.value)
|
|
|
|
if (is_valid) {
|
|
|
|
if (is_valid) {
|
|
|
|
|
|
|
|
var progress = 0
|
|
|
|
|
|
|
|
, timerID = null
|
|
|
|
|
|
|
|
e.preventDefault()
|
|
|
|
status_msg.className = 'info'
|
|
|
|
status_msg.className = 'info'
|
|
|
|
status_msg.innerHTML = "Got it, thanks"
|
|
|
|
status_msg.innerHTML = "Sending"
|
|
|
|
setTimeout(function() { form.submit() }, 600)
|
|
|
|
timerID = setInterval(function() {
|
|
|
|
|
|
|
|
if (++progress < 8) {
|
|
|
|
|
|
|
|
status_msg.innerHTML += "."
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
clearInterval(timerID)
|
|
|
|
|
|
|
|
form.submit()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 150)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
input_email.value = ''
|
|
|
|
|
|
|
|
e.preventDefault()
|
|
|
|
e.preventDefault()
|
|
|
|
|
|
|
|
input_email.value = ''
|
|
|
|
status_msg.className = 'error'
|
|
|
|
status_msg.className = 'error'
|
|
|
|
status_msg.innerHTML = "that doesn't look like an email address,"
|
|
|
|
status_msg.innerHTML = "that doesn't look like an email address,"
|
|
|
|
+ "<br />please try again..."
|
|
|
|
+ "<br />please try again..."
|
|
|
|