mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Merge pull request #1406 from SchrodingersGat/part-pricing-form-error
Add option to hide form error message
This commit is contained in:
		@@ -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 {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        if (!options.hideErrorMessage) {
 | 
				
			||||||
                            var warningDiv = $(modal).find('#form-validation-warning');
 | 
					                            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);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user