Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
making signup button functional again
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuthay committed Jan 16, 2012
1 parent b2fcb6f commit 8909646
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions storefront/templates/get_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,46 @@
{{ block.super }}

<script type="text/javascript" src="{% static 'common/js/function01.js' %}"></script>

<script>
$(window).ready(function() {
$('#signup').submit(function() {
try {
$.ajax(
{
type: "POST",
data: { 'email': $('#email').val() },
dataType: 'json',
success: function(data, text, x) {
//$('#email').val(data['api_key']);
$('#get_api_url').hide();
$('.user_email').text(data['email']);
$('.logged_out').hide();
$('.logged_in').show();
$('.private_apiurl').text(data['private_api_url']);
$('.public_apiurl').text(data['public_api_url']);
$('#account_created').show();


// if you wanted to use some tracking tool (mixpanel, google analytics? ),
// this is the place to callback the service
},
error: function(x, text, err) {
$('#email_error').text(x.responseText);
$('.signup').val('SIGN UP');
}
}
);
$('#email_error').text('')
$('.signup').val('...');
} finally {
return false;
}
});
});

</script>

{% endblock %}


Expand Down

0 comments on commit 8909646

Please sign in to comment.