From 332a8033c66c7906233d068f03e22862cae11ba4 Mon Sep 17 00:00:00 2001 From: Rafael Ostertag <rafael.ostertag@math.uzh.ch> Date: Fri, 7 Oct 2016 16:22:30 +0200 Subject: [PATCH] Un-done some changes to QfqForm#clearAllValidationStates(). --- javascript/src/QfqForm.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/javascript/src/QfqForm.js b/javascript/src/QfqForm.js index a11ff1eb7..5c6ef901e 100644 --- a/javascript/src/QfqForm.js +++ b/javascript/src/QfqForm.js @@ -708,7 +708,14 @@ var QfqNS = QfqNS || {}; n.QfqForm.prototype.clearAllValidationStates = function () { + // Reset any messages/states added by bootstrap-validator. this.form.$form.validator('reset'); + + // Reset any states added by a call to QfqForm#setValidationState() + $('.has-warning,.has-error,.has-success,.has-danger').removeClass("has-warning has-error has-success" + + " has-danger"); + + // Remove all messages received from server upon form submit. $('[data-qfq=validation-message]').remove(); }; -- GitLab