Remove redundant client-side render

Incidentally resolves a JavaScript error introduced in #3138 affecting
pages without the proposal form:

    Uncaught TypeError: text is undefined
      at word_count (app/assets/javascripts/osem.js:134)
This commit is contained in:
Andrew Kvalheim 2023-05-30 19:21:09 -07:00
parent 63a83f1938
commit 99c854f7d5

View file

@ -145,7 +145,7 @@ function word_count(text, divId, maxcount) {
/* Wait for the DOM to be ready before attaching events to the elements */
$( document ).ready(function() {
/* Set the minimum and maximum proposal abstract word length */
function updateEventTypeRequirements() {
$("#event_event_type_id").change(function () {
var $selected = $("#event_event_type_id option:selected")
var max = $selected.data("max-words");
var min = $selected.data("min-words");
@ -153,9 +153,7 @@ $( document ).ready(function() {
$("#abstract-maximum-word-count").text(max);
$("#abstract-minimum-word-count").text(min);
word_count($('#event_abstract').get(0), 'abstract-count', max);
}
$("#event_event_type_id").change(updateEventTypeRequirements);
updateEventTypeRequirements();
});
/* Count the proposal abstract length */
$("#event_abstract").on('input', function() {