Skip to content
Snippets Groups Projects
Commit c87b7a0a authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Don't go negative on the Extend modal character count.

parent d9dae9e2
No related branches found
No related tags found
No related merge requests found
...@@ -123,6 +123,9 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal, ...@@ -123,6 +123,9 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
$('#why_extend').on('focus keyup', function (e) { $('#why_extend').on('focus keyup', function (e) {
var len = $('#why_extend').val().length; var len = $('#why_extend').val().length;
var left = 120 - len; var left = 120 - len;
if (left < 0) {
left = 0;
}
var msg = "You need at least " + left + " more characters"; var msg = "You need at least " + left + " more characters";
$('#extend_counter_msg').html(msg); $('#extend_counter_msg').html(msg);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment