MDL-69608 core_form: frozen forms do not have form tag
authorMarina Glancy <marina@moodle.com>
Tue, 1 Sep 2020 15:11:10 +0000 (17:11 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 2 Sep 2020 21:48:39 +0000 (23:48 +0200)
theme/boost/amd/build/form-display-errors.min.js
theme/boost/amd/build/form-display-errors.min.js.map
theme/boost/amd/src/form-display-errors.js

index cd80f47..e169aac 100644 (file)
Binary files a/theme/boost/amd/build/form-display-errors.min.js and b/theme/boost/amd/build/form-display-errors.min.js differ
index 4ff6e98..bfeb1b8 100644 (file)
Binary files a/theme/boost/amd/build/form-display-errors.min.js.map and b/theme/boost/amd/build/form-display-errors.min.js.map differ
index 230cbc5..a839184 100644 (file)
@@ -69,7 +69,7 @@ define(['jquery', 'core/event'], function($, Event) {
             });
 
             var form = element.closest('form');
-            if (!('boostFormErrorsEnhanced' in form.dataset)) {
+            if (form && !('boostFormErrorsEnhanced' in form.dataset)) {
                 form.addEventListener('submit', function() {
                     var visibleError = $('.form-control-feedback:visible');
                     if (visibleError.length) {