@@ -52,15 +52,13 @@
// Insert the token ID into the form so it gets submitted to the server:
$form = $form.append($('<input type="hidden" name="stripe_token" />').val(token));
// Submit the form:
$submit.prop('disabled', false);
$submit.click();
$submit.prop('disabled', true);
$form.get(0).submit();
$form.append($('<p>').text("Processing your payment. Please do not refresh."));
}
};
</script>
{% endblock %}
@@ -82,9 +80,9 @@
<a class="close" data-dismiss="alert">×</a>
<span id="payment-errors"></span>
</div>
{% csrf_token %}
{{form|bootstrap}}
<input id="submit" class="btn btn-primary" type="submit" value="Pay {{ invoice.balance_due }}" />
<input id="pay" class="btn btn-primary" type="submit" value="Pay {{ invoice.balance_due }}" />
</form>