From be59478c02b4101988da2392e2c3b0b7d04d792a Mon Sep 17 00:00:00 2001 From: f Date: Mon, 24 Jun 2024 17:31:29 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20no=20enviar=20el=20formulario=20si=20tie?= =?UTF-8?q?ne=20alg=C3=BAn=20atributo=20de=20htmx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/controllers/form_validation_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/controllers/form_validation_controller.js b/app/javascript/controllers/form_validation_controller.js index 85e7bb86..862ca9f3 100644 --- a/app/javascript/controllers/form_validation_controller.js +++ b/app/javascript/controllers/form_validation_controller.js @@ -33,7 +33,7 @@ export default class extends Controller { if (this.element.reportValidity()) { this.element.classList.remove("was-validated"); - if (!this.element.hasAttribute("hx-post")) this.element.submit(); + if (!this.element.getAttributeNames().some(x => x.startsWith("hx-"))) this.element.submit(); window.dispatchEvent(new CustomEvent("notification:show", { detail: { id: this.submittingIdValue } })); } else {