mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Fix job form error message generation
This commit is contained in:
parent
55a86a60f3
commit
fb0ca7e759
@ -79,7 +79,7 @@ nopaque.Forms.init = function() {
|
|||||||
}
|
}
|
||||||
if (request.status === 400) {
|
if (request.status === 400) {
|
||||||
for (let [field, errors] of Object.entries(JSON.parse(this.responseText))) {
|
for (let [field, errors] of Object.entries(JSON.parse(this.responseText))) {
|
||||||
fieldElement = form.querySelector(`input[name="${field}"]`).closest(".input-field");
|
fieldElement = form.querySelector(`input[name="add-job-form-${field}"]`).closest(".input-field");
|
||||||
for (let error of errors) {
|
for (let error of errors) {
|
||||||
fieldElement.insertAdjacentHTML("beforeend", `<span class="helper-text red-text">${error}</span>`);
|
fieldElement.insertAdjacentHTML("beforeend", `<span class="helper-text red-text">${error}</span>`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user