This commit is contained in:
Matthias 2021-06-06 17:44:02 +02:00
parent 4f7edac213
commit d70b4bcabb

View File

@ -775,11 +775,6 @@ function handleModalForm(url, options) {
} }
// Form was returned, invalid! // Form was returned, invalid!
else { else {
if (response.title) {
modalSetTitle(modal, response.title);
}
if (!response.hideErrorMessage && !options.hideErrorMessage) { if (!response.hideErrorMessage && !options.hideErrorMessage) {
var warningDiv = $(modal).find('#form-validation-warning'); var warningDiv = $(modal).find('#form-validation-warning');
warningDiv.css('display', 'block'); warningDiv.css('display', 'block');
@ -795,6 +790,11 @@ function handleModalForm(url, options) {
if (options.secondary) { if (options.secondary) {
attachSecondaries(modal, options.secondary); attachSecondaries(modal, options.secondary);
} }
if (response.title) {
modalSetTitle(modal, response.title);
}
if (response.buttons) { if (response.buttons) {
// Clean custom action buttons // Clean custom action buttons
$(modal).find('#modal-footer-buttons').html(''); $(modal).find('#modal-footer-buttons').html('');