##// END OF EJS Templates
Block the form when message is being sent
neko259 -
r1637:db51ab04 default
parent child Browse files
Show More
@@ -346,6 +346,7 b' function updateOnPost(response, statusTe'
346 346 var status = json.status;
347 347
348 348 showAsErrors(form, '');
349 $('.post-form-w').unblock();
349 350
350 351 if (status === 'ok') {
351 352 resetFormPosition();
@@ -438,7 +439,7 b' function updateNodeAttr(oldNode, newNode'
438 439 if (form.length > 0) {
439 440 var options = {
440 441 beforeSubmit: function(arr, form, options) {
441 showAsErrors(form, gettext('Sending message...'));
442 $('.post-form-w').block({ message: gettext('Sending message...') });
442 443 },
443 444 success: updateOnPost,
444 445 error: function(xhr, textStatus, errorString) {
@@ -447,6 +448,7 b' function updateNodeAttr(oldNode, newNode'
447 448 errorText += ' / ' + errorString;
448 449 }
449 450 showAsErrors(form, errorText);
451 $('.post-form-w').unblock();
450 452 },
451 453 url: '/api/add_post/' + threadId + '/',
452 454 timeout: POST_AJAX_TIMEOUT
General Comments 0
You need to be logged in to leave comments. Login now