Avoid using ES6 syntax to prevent Heroku asset compilation from failing

This commit is contained in:
CactusPuppy 2021-03-19 01:16:43 -07:00
parent 12f4b75e16
commit f5a8587b4c
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82

View file

@ -148,7 +148,7 @@ function word_count(text, divId, maxcount) {
};
function fill_if_empty(text_area, filler) {
let area = $('#' + text_area);
var area = $('#' + text_area);
if (!area.val()) {
area.val(filler);
@ -192,11 +192,11 @@ $( document ).ready(function() {
/* Listen for reset template button, wait for confirm, and reset. */
$('#sub_text_reset').click((e) => {
let $selected = $("#event_event_type_id option:selected");
let $this = $(e.target);
let affirm = confirm($this.data('confirm'));
var $selected = $("#event_event_type_id option:selected");
var $this = $(e.target);
var affirm = confirm($this.data('confirm'));
if (affirm) {
let sub_text = $('#event_submission_text');
var sub_text = $('#event_submission_text');
sub_text.val($selected.data('help'));
sub_text.trigger('change');
}