Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Properly serialize newsletter form before sending the request (bug 10…
Browse files Browse the repository at this point in the history
…46888)
  • Loading branch information
diox committed Aug 13, 2014
1 parent 355f279 commit 98832e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/media/js/views/main.js
@@ -1,6 +1,6 @@
define('views/main',
['l10n', 'requests', 'urls', 'z'],
function(l10n, requests, urls, z) {
['l10n', 'requests', 'urls', 'utils', 'z'],
function(l10n, requests, urls, utils, z) {

var gettext = l10n.gettext;

Expand All @@ -10,7 +10,7 @@ define('views/main',
var $signup = $('main').find('.newsletter.promo');

var $this = $(this);
var data = {email: decodeURIComponent($this.serialize().split('=')[1])};
var data = utils.getVars($this.serialize());

$signup.find('.processing').removeClass('hidden');

Expand Down
1 change: 1 addition & 0 deletions src/templates/main.html
Expand Up @@ -56,6 +56,7 @@ <h3> {{ _('Get Firefox Marketplace news') }} </h3>
<form class="news-signup-form">
<p>
<input placeholder="{{ _('Enter your email address') }}" type="email" id="email" name="email" value="{{ email }}" required>
<input type="hidden" name="newsletter" value="about:apps" />
<button class="button" type="submit">{{ _('Sign up') }}</button>
</p>
<p class="privacy">
Expand Down

0 comments on commit 98832e7

Please sign in to comment.