mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add option to hide form error message
This commit is contained in:
parent
b17a50bd51
commit
2de879d2ba
@ -241,6 +241,7 @@
|
|||||||
"{% url 'part-pricing' part.id %}",
|
"{% url 'part-pricing' part.id %}",
|
||||||
{
|
{
|
||||||
submit_text: 'Calculate',
|
submit_text: 'Calculate',
|
||||||
|
hideErrorMessage: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -739,9 +739,10 @@ function handleModalForm(url, options) {
|
|||||||
// Form was returned, invalid!
|
// Form was returned, invalid!
|
||||||
else {
|
else {
|
||||||
|
|
||||||
var warningDiv = $(modal).find('#form-validation-warning');
|
if (!options.hideErrorMessage) {
|
||||||
|
var warningDiv = $(modal).find('#form-validation-warning');
|
||||||
warningDiv.css('display', 'block');
|
warningDiv.css('display', 'block');
|
||||||
|
}
|
||||||
|
|
||||||
if (response.html_form) {
|
if (response.html_form) {
|
||||||
injectModalForm(modal, response.html_form);
|
injectModalForm(modal, response.html_form);
|
||||||
|
Loading…
Reference in New Issue
Block a user