diff --git a/templates/classifieds/edit.html b/templates/classifieds/edit.html index 39d3147..aa2c4ae 100644 --- a/templates/classifieds/edit.html +++ b/templates/classifieds/edit.html @@ -82,7 +82,7 @@
-
+
@@ -193,7 +193,7 @@ quill.root.innerHTML = {{ classified.description|tojson }}; (function() { var qc = document.getElementById('quill-editor'); quill.on('text-change', function() { qc && qc.classList.remove('field-error'); }); - document.querySelector('form').addEventListener('submit', function(e) { + document.getElementById('classifiedForm').addEventListener('submit', function(e) { var html = quill.root.innerHTML; var empty = (html === '


' || quill.getText().trim() === ''); if (empty) { diff --git a/templates/classifieds/new.html b/templates/classifieds/new.html index 42988bd..41b2c5f 100755 --- a/templates/classifieds/new.html +++ b/templates/classifieds/new.html @@ -270,7 +270,7 @@ Ogłoszenie będzie widoczne przez 30 dni. Po tym czasie wygaśnie automatycznie.
- + {% if has_multiple_companies %} @@ -393,7 +393,7 @@ var quill = new Quill('#quill-editor', { // Clear error highlight as soon as user starts typing quill.on('text-change', function() { qc && qc.classList.remove('field-error'); }); - document.querySelector('form').addEventListener('submit', function(e) { + document.getElementById('classifiedForm').addEventListener('submit', function(e) { var html = quill.root.innerHTML; var empty = (html === '


' || quill.getText().trim() === ''); if (empty) {