Do not take "optional" as part of error message label (#4309)

This commit is contained in:
Raphael Michel
2024-07-18 14:57:25 +02:00
committed by GitHub
parent c91eb2e20d
commit 83b1c2ea7e

View File

@@ -781,7 +781,7 @@ function setup_basics(el) {
scrollTarget.id = "panel_" + $("input", scrollTarget).attr("id"); scrollTarget.id = "panel_" + $("input", scrollTarget).attr("id");
} }
} else { } else {
label = $("label", this).first().text(); label = $("label", this).first().contents().filter(function () { return this.nodeType != Node.ELEMENT_NODE || !this.classList.contains("optional") }).text();
description = $(".help-block", this).first().text(); description = $(".help-block", this).first().text();
scrollTarget = $(":input", this).get(0); scrollTarget = $(":input", this).get(0);
} }