diff --git a/tildes/static/js/scripts.js b/tildes/static/js/scripts.js index 9ef0c79..0504903 100644 --- a/tildes/static/js/scripts.js +++ b/tildes/static/js/scripts.js @@ -59,7 +59,12 @@ $(document).on('complete.ic', function(evt, elt, data, status, xhr, requestId) { if (status === 'success') { $statusElement.addClass('form-status-success').text('Saved successfully'); } else { - $statusElement.addClass('form-status-error').text(xhr.responseText); + if (xhr.status === 413) { + errorText = "Too much data submitted"; + } else { + errorText = xhr.responseText; + } + $statusElement.addClass('form-status-error').text(errorText); } $statusElement.fadeIn('slow'); });