-
Notifications
You must be signed in to change notification settings - Fork 0
/
thank-you-for-commiting.html
74 lines (66 loc) · 2.75 KB
/
thank-you-for-commiting.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
layout: default
title: MAYDAY.US - Join Our Voting Block
omit_title_suffix: true
cssid: thank-you-for-commiting
hideSidebar: true
---
{% capture content %}
<h2>Glad to have you with us!</h2>
<p>The next most important thing you can do to help MAYDAY is to identify yourself as a voter committed to our issue. We've launched a "voting block for fundamental reform." Join the MAYDAY voting block – to be reminded to register, and get updates which candidates in your district are commited to fundamental reform. </p>
<div id="content" class="row" style="max-width:500px;margin:0 auto 30px">
<div class="row">
<form accept-charset="UTF-8" action="https://www.votingblocks.com/join" id="join_form" method="post" _lpchecked="1" target="voting-block-iframe">
<input name="utf8" type="hidden" value="✓" />
<input name="email" type="hidden" value="" id="email" />
<input id="block_id" name="block_id" type="hidden" value="4" />
<div class="row">
<div class="input-group input-group-lg">
<label>Mobile (required)</label>
<input id="mobile" type="tel" placeholder="MOBILE #" name="mobile" class="form-control" />
</div>
</div>
<div class="row">
<div class="input-group input-group-lg">
<label>Zipcode</label>
<input id="zip" type="text" placeholder="ZIP CODE" name="zip_code" class="form-control" />
</div>
</div>
<div class="row">
<div class="input-group-btn">
<button id="submitButton" type="submit" class="btn btn-primary">Count My Vote!</button>
</div>
</div>
</form>
</div>
</div>
{% endcapture %}
{% capture footer_content %}
<script type="text/javascript" charset="utf-8" async defer>
$(document).ready(function(){
$('#join_form').validate({
rules: {
mobile: {required: true, phoneUS: true },
zip: {required: true, minlength: 5 }
},
submitHandler: function(form) {
$(form).find('#submitButton').text('Loading...')
form.submit()
setTimeout(function () {
window.location.href = "https://mayday.us/newpledge-with-thanks";
}, 1000); //delay redirect to ensure form submission is good, since we can't test the ifame.
}
});
var storedData = $.cookie();
if(typeof storedData.userZip != 'undefined' && storedData.userZip != ''){
$('#zip').val(storedData.userZip);
}
if(typeof storedData.userEmail != 'undefined' && storedData.userEmail != ''){
$('#email').val(storedData.userEmail);
}
});
</script>
{% endcapture %}
<!-- form is submited through invisible iframe to skirt around cross-domain issues. -->
<iframe src="about:blank" name="voting-block-iframe" style="display:none"></iframe>
{% include subpage.html %}