Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development

This commit is contained in:
stephan 2020-03-02 15:31:36 +01:00
commit 6a509646e7

View File

@ -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>`);
} }