Skip to content

Commit 4ad1df3

Browse files
committed
Fixed disabled button not reverting on error
1 parent edda968 commit 4ad1df3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mod_shoutbox/media/js/mod_shoutbox.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ JJShoutbox.showError = function(msg, instance)
272272
errorBox.empty();
273273
});
274274

275+
instance.find('#shoutbox-submit').prop('disabled', false);
276+
275277
return false;
276278
}
277279

@@ -551,7 +553,7 @@ jQuery(document).ready(function($) {
551553
request['Itemid'] = params.itemId;
552554
}
553555

554-
var submitButton = $('#shoutbox-submit');
556+
var submitButton = params.instance.find('#shoutbox-submit');
555557
submitButton.prop('disabled', true);
556558

557559
// AJAX request
@@ -728,7 +730,6 @@ jQuery(document).ready(function($) {
728730
// AJAX request
729731
$.ajax({
730732
type: 'POST',
731-
url: 'index.php?option=com_ajax&module=shoutbox&method=getPosts&format=json',
732733
data: request,
733734
success: function(response){
734735
if (response.success)

0 commit comments

Comments
 (0)