fix: [helpers:bootstrap] Correctly pass modal instance and set correct status node
parent
d21bad721a
commit
b995d06db9
|
@ -715,11 +715,11 @@ class ModalFactory {
|
||||||
})
|
})
|
||||||
this.ajaxApi.push(tmpApi)
|
this.ajaxApi.push(tmpApi)
|
||||||
} else {
|
} else {
|
||||||
this.ajaxApi.statusNode = $buttonConfirm[0]
|
this.ajaxApi.options.statusNode = $buttonConfirm[0]
|
||||||
this.ajaxApi = [this.ajaxApi];
|
this.ajaxApi = [this.ajaxApi];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.ajaxApi.statusNode = $buttonConfirm[0]
|
this.ajaxApi.options.statusNode = $buttonConfirm[0]
|
||||||
}
|
}
|
||||||
return (evt) => {
|
return (evt) => {
|
||||||
let confirmFunction = this.options.confirm
|
let confirmFunction = this.options.confirm
|
||||||
|
@ -763,7 +763,7 @@ class ModalFactory {
|
||||||
return clickResult
|
return clickResult
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
selfModal.options.POSTSuccessCallback(data)
|
selfModal.options.POSTSuccessCallback([data, this])
|
||||||
} else { // Validation error
|
} else { // Validation error
|
||||||
selfModal.injectFormValidationFeedback(form, data.errors)
|
selfModal.injectFormValidationFeedback(form, data.errors)
|
||||||
return Promise.reject('Validation error');
|
return Promise.reject('Validation error');
|
||||||
|
@ -799,7 +799,7 @@ class ModalFactory {
|
||||||
return clickResult
|
return clickResult
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
this.options.POSTSuccessCallback(data)
|
this.options.POSTSuccessCallback([data, this])
|
||||||
} else { // Validation error
|
} else { // Validation error
|
||||||
this.injectFormValidationFeedback(form, data.errors)
|
this.injectFormValidationFeedback(form, data.errors)
|
||||||
return Promise.reject('Validation error');
|
return Promise.reject('Validation error');
|
||||||
|
|
Loading…
Reference in New Issue