Skip to content

Commit

Permalink
Merge pull request #569 from codesy/submitting-ui-feedback-493
Browse files Browse the repository at this point in the history
for #493: disable submit buttons while submitting
  • Loading branch information
groovecoder committed Feb 8, 2018
2 parents 49838fe + dab5d6b commit 89457a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions static/js/codesy-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ $(window).on("load",function () {
return function (e) {
e.preventDefault();
form = $(this)
form.find('input[type="submit"]').prop('disabled', true);
$.ajax( {
url: form.attr('action'),
method: form.data("method"),
Expand Down Expand Up @@ -117,6 +118,7 @@ $(window).on("load",function () {
e.preventDefault();
set_holder_type($('#account_holder_type'))
$('#stripe-submit').text('Submitting ... ');
$('#stripe-submit').prop('disabled', true);
Stripe[stripe_account_type].createToken($stripe_form, handleResponse);
});
})
Expand Down
2 changes: 2 additions & 0 deletions static/js/widget-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class WidgetApp {
submit(e){
e.preventDefault()
var form = this.$form
form.find('input[type="submit"]').prop('value', "Submitting ...")
form.find('input[type="submit"]').prop('disabled', true)
var csrf_token = form.find('input[name=csrfmiddlewaretoken]').val()
var api_call = $.ajax({
url: form.attr('action'),
Expand Down

0 comments on commit 89457a4

Please sign in to comment.