From b995d06db90788f650b1c7e409fa15e45037d7b0 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 21 Oct 2021 11:11:33 +0200 Subject: [PATCH 1/2] fix: [helpers:bootstrap] Correctly pass modal instance and set correct status node --- webroot/js/bootstrap-helper.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webroot/js/bootstrap-helper.js b/webroot/js/bootstrap-helper.js index 733f422..4762df5 100644 --- a/webroot/js/bootstrap-helper.js +++ b/webroot/js/bootstrap-helper.js @@ -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'); From 41d9b969612e64e1cab715e570607149352bf82c Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 21 Oct 2021 11:12:57 +0200 Subject: [PATCH 2/2] fix: [inboxProcessor:userRegistration] Provide correct request feedback --- .../default/InboxProcessors/templates/User/Registration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/default/InboxProcessors/templates/User/Registration.php b/libraries/default/InboxProcessors/templates/User/Registration.php index 2eaffb0..5480862 100644 --- a/libraries/default/InboxProcessors/templates/User/Registration.php +++ b/libraries/default/InboxProcessors/templates/User/Registration.php @@ -77,11 +77,11 @@ echo $this->Bootstrap->modal([