mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
refactor
This commit is contained in:
parent
4f7edac213
commit
d70b4bcabb
@ -775,11 +775,6 @@ function handleModalForm(url, options) {
|
||||
}
|
||||
// Form was returned, invalid!
|
||||
else {
|
||||
|
||||
if (response.title) {
|
||||
modalSetTitle(modal, response.title);
|
||||
}
|
||||
|
||||
if (!response.hideErrorMessage && !options.hideErrorMessage) {
|
||||
var warningDiv = $(modal).find('#form-validation-warning');
|
||||
warningDiv.css('display', 'block');
|
||||
@ -795,6 +790,11 @@ function handleModalForm(url, options) {
|
||||
if (options.secondary) {
|
||||
attachSecondaries(modal, options.secondary);
|
||||
}
|
||||
|
||||
if (response.title) {
|
||||
modalSetTitle(modal, response.title);
|
||||
}
|
||||
|
||||
if (response.buttons) {
|
||||
// Clean custom action buttons
|
||||
$(modal).find('#modal-footer-buttons').html('');
|
||||
|
Loading…
Reference in New Issue
Block a user