From: Vincent Vanwaelscappel Date: Tue, 13 Oct 2020 08:28:51 +0000 (+0200) Subject: fix #3945 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7dd5574f0dc34b48740faca92dcecb380b362138;p=fluidbook-toolbox.git fix #3945 @0.75 --- diff --git a/resources/quiz/js/main.js b/resources/quiz/js/main.js index f21909950..4e6874d85 100644 --- a/resources/quiz/js/main.js +++ b/resources/quiz/js/main.js @@ -156,9 +156,9 @@ q.addClass('multiple'); } } else if (type === 'text' || type === "email") { - $(holder).append('') + $(holder).append('') } else if (type === 'textarea') { - $(holder).append('') + $(holder).append('') } $(q).find('.answers').append($(holder)); @@ -220,6 +220,13 @@ function validateMulti(button) { var question = $(button).closest('.question'); + if ($(question).find('input').length > 0) { + var input = $(question).find('input'); + if (!$(input).get(0).checkValidity()) { + $(input).get(0).reportValidity() + return; + } + } var ok = true; $(question).find('.answer').each(function () { if (($(this).attr('data-correct') == '1') != $(this).hasClass('active')) {