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 %}",
|
||||
{
|
||||
submit_text: 'Calculate',
|
||||
hideErrorMessage: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -739,9 +739,10 @@ function handleModalForm(url, options) {
|
|||
// Form was returned, invalid!
|
||||
else {
|
||||
|
||||
var warningDiv = $(modal).find('#form-validation-warning');
|
||||
|
||||
warningDiv.css('display', 'block');
|
||||
if (!options.hideErrorMessage) {
|
||||
var warningDiv = $(modal).find('#form-validation-warning');
|
||||
warningDiv.css('display', 'block');
|
||||
}
|
||||
|
||||
if (response.html_form) {
|
||||
injectModalForm(modal, response.html_form);
|
||||
|
|
|
|||
Loading…
Reference in New Issue