-
Notifications
You must be signed in to change notification settings - Fork 0
/
change_email_prefs.html
64 lines (55 loc) · 2.43 KB
/
change_email_prefs.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
---
layout: default
title: MAYDAY.US - Change Email Preferences
omit_title_suffix: true
cssid: change_email_prefs
---
{% capture content %}
<!--
User's email address: id="user_email_address"
Form Name: name="changeEmailPrefs"
action: changeEmailPrefs();
Field: "fundraiseok" - values are Yes and No.
-->
<h1>Change e-mail preferences</h1>
<p>Here, you will be able to change your e-mail preferences to opt-in or opt-out of fundraising e-mails. For more information on our policy, check out <a href="/2014/07/30/EmailFundraising/">our blog post on email fundraising</a>.</p>
<p>Your E-Mail Address: <span id="user_email_address" style="text-weight:bold;">Email</span></p>
<form id="changeEmailPrefs" action="javascript:;" method="get">
<input style="vertical-align: baseline;" type="radio" name="fundraiseok" value="Yes"><label><strong> Send Me All E-mails Including Fundraising E-mails</strong></label><br />
I want to receive them and help out some more as we hit crucial milestones in our campaign leading up to Election Day. </span><br><BR>
<input style="vertical-align: baseline;" type="radio" name="fundraiseok" value="No"><label><strong> Do Not Send Me Fundraising E-mails</strong></label><br />
I'm just interested in how I can help out non-financially at this stage, as well as getting news and updates from the campaign. If I need to donate, I'm pretty sure I'll remember the "Mayday.US" address, after all. </span>
<BR><BR>
<input type="submit" value="Submit">
</form>
{% endcapture %}
{% capture footer_content %}
<script>
function changeEmailPrefs() {
var preference = $("input:radio[name=fundraiseok]:checked").val() || null;
if (preference) {
var params = {
'email':userEmail,
'MERGE13':preference,
'redirect':'https://mayday.us/change_email_prefs_thanks/',
'source':'changePrefs'
};
post_to_url("https://pledge.mayday.us/r/subscribe", params);
} else {
alert('Please select a preference.');
}
}
var userEmail = null;
// $('#emailAddress').text('(At ' + email + ')');
$(document).ready( function() {
userEmail = getParameterByName('email') || null;
$('#changeEmailPrefs').submit(changeEmailPrefs);
if (userEmail) {
$('#user_email_address').text(userEmail);
} else {
alert('No email provided, looks like you followed a bad link and this form will not work');
}
});
</script>
{% endcapture %}
{% include subpage_nomarkdown.html %}