How to make title and abstract required in all languages during submission

Hi! I have OJS 3.2.1.4
Our policy is to make the title and abstract required in all languages to the authors submission.

I have seen that the required title is according to the site’s language, so if I am looking at the English site I am only required to fill in the title in English but the other language’s title field can be left empty.

I have tried to make a condition with JavaScript to verify this on the title and it has been working, but I am having issues getting it to work with the abstract:

if(document.getElementById('submitStep3Form')) {
        var formEl = document.getElementById('submitStep3Form');
        formEl.getElementsByClassName('submitFormButton')[0].addEventListener("click", function(){
            var erros = 0;
            var eles = [];
            var inputs = formEl.getElementsByTagName("input");
            for(var i = 0; i < inputs.length; i++) {
                if(inputs[i].name.indexOf('title') == 0) {
                    eles.push(inputs[i]);
                    if(inputs[i].value == '') {
                        erros++;
                        inputs[i].focus();
                    }
                }
            }
            if(erros > 0) {
                eles[0].focus();
                return false;
            }
        });
        
        var formEl = document.getElementById('submitStep3Form');
        formEl.getElementsByClassName('submitFormButton')[0].addEventListener("click", function(){
            var erros = 0;
            var eles = [];
            var inputs = formEl.getElementsByTagName("textarea");
            for(var i = 0; i < inputs.length; i++) {
                if(inputs[i].name.indexOf('abstract') == 0) {
                    eles.push(inputs[i]);
                    if(inputs[i].value == '') {
                        erros++;
                        inputs[i].focus();
                    }
                }
            }
            console.log(erros);
            if(erros > 0) {
                console.log(eles[0].getAttribute('name'));
                $("textarea[id*='abstract']").tinymce().focus();
                eles[0].focus();
                return false;
            }
        });
}

I know this code can be improves (I also welcome any suggestions) but what is most important is to also get it to work with the abstract, since the abstract works with tinymce I can’t adjust the above code.

Any ideas to focus on the abstract field?

previous related discussion: