From ebe2ae77a56930edecf3d54d2a3935cb4da8ae27 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 17 Jun 2021 19:18:34 +0200 Subject: [PATCH] hide error message with response --- InvenTree/templates/js/modals.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/templates/js/modals.js b/InvenTree/templates/js/modals.js index c8ebd90eb4..3ff20a9e5f 100644 --- a/InvenTree/templates/js/modals.js +++ b/InvenTree/templates/js/modals.js @@ -776,7 +776,8 @@ function handleModalForm(url, options) { // Form was returned, invalid! else { - if (!options.hideErrorMessage) { + // Disable error message with option or response + if (!options.hideErrorMessage && !response.hideErrorMessage) { var warningDiv = $(modal).find('#form-validation-warning'); warningDiv.css('display', 'block'); }