Merge branch 'develop' of github.com:cerebrate-project/cerebrate into develop

pull/79/head
iglocska 2021-10-21 11:26:46 +02:00
commit 68ca3b4a46
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 6 additions and 6 deletions

View File

@ -77,11 +77,11 @@ echo $this->Bootstrap->modal([
<script>
function submitRegistration(modalObject, tmpApi) {
const $form = modalObject.$modal.find('form')
tmpApi.postForm($form[0]).then(() => {
return tmpApi.postForm($form[0]).then((result) => {
const url = '/inbox/index'
const $container = $('div[id^="table-container-"]')
const randomValue = $container.attr('id').split('-')[2]
UI.reload(url, $(`#table-container-${randomValue}`), $(`#table-container-${randomValue} table.table`))
return result
})
}

View File

@ -715,11 +715,11 @@ class ModalFactory {
})
this.ajaxApi.push(tmpApi)
} else {
this.ajaxApi.statusNode = $buttonConfirm[0]
this.ajaxApi.options.statusNode = $buttonConfirm[0]
this.ajaxApi = [this.ajaxApi];
}
} else {
this.ajaxApi.statusNode = $buttonConfirm[0]
this.ajaxApi.options.statusNode = $buttonConfirm[0]
}
return (evt) => {
let confirmFunction = this.options.confirm
@ -763,7 +763,7 @@ class ModalFactory {
return clickResult
.then((data) => {
if (data.success) {
selfModal.options.POSTSuccessCallback(data)
selfModal.options.POSTSuccessCallback([data, this])
} else { // Validation error
selfModal.injectFormValidationFeedback(form, data.errors)
return Promise.reject('Validation error');
@ -799,7 +799,7 @@ class ModalFactory {
return clickResult
.then((data) => {
if (data.success) {
this.options.POSTSuccessCallback(data)
this.options.POSTSuccessCallback([data, this])
} else { // Validation error
this.injectFormValidationFeedback(form, data.errors)
return Promise.reject('Validation error');