-
Notifications
You must be signed in to change notification settings - Fork 396
Mantis #45000: ILIAS 10 - Show confirmation modal on contact unlink #10933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release_10
Are you sure you want to change the base?
Mantis #45000: ILIAS 10 - Show confirmation modal on contact unlink #10933
Conversation
2167e74 to
9142c32
Compare
mjansenDatabay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx @mBeym , I added some inline comments.
48d6b8e to
904df3b
Compare
components/ILIAS/Contact/BuddySystem/classes/class.ilBuddySystemGUI.php
Outdated
Show resolved
Hide resolved
57cba1f to
da496d1
Compare
97b0882 to
b70d18a
Compare
b70d18a to
172780b
Compare
172780b to
8802be4
Compare
|
|
||
| submitButton.addEventListener('click', (event) => { | ||
| event.preventDefault(); | ||
| global.jQuery(document).trigger(this.unlinkConfirmationModal.signals.close, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try:
| global.jQuery(document).trigger(this.unlinkConfirmationModal.signals.close, {}); | |
| this.unlinkModal.close(); |
| resolve(); | ||
| }, { signal: this.unlinkModalAbortController.signal }); | ||
|
|
||
| global.jQuery(document).trigger(this.unlinkConfirmationModal.signals.show, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try:
| global.jQuery(document).trigger(this.unlinkConfirmationModal.signals.show, {}); | |
| global.il.UI.modal.showModal( | |
| this.unlinkModal, | |
| {}, | |
| { | |
| id: this.unlinkConfirmationModal.modalId, | |
| }, | |
| this.unlinkConfirmationModal.signals.close | |
| ); |
| $confirmation_modal = $this->ui_factory->modal()->interruptive( | ||
| $this->lng->txt('confirmation'), | ||
| $this->lng->txt('buddy_confirm_unlink'), | ||
| '' | ||
| ) | ||
| ->withActionButtonLabel($this->lng->txt('confirm')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try:
| $confirmation_modal = $this->ui_factory->modal()->interruptive( | |
| $this->lng->txt('confirmation'), | |
| $this->lng->txt('buddy_confirm_unlink'), | |
| '' | |
| ) | |
| ->withActionButtonLabel($this->lng->txt('confirm')); | |
| $modal_id = null; | |
| $confirmation_modal = $this | |
| ->ui_factory | |
| ->modal() | |
| ->interruptive( | |
| $this->lng->txt('confirmation'), | |
| $this->lng->txt('buddy_confirm_unlink'), | |
| '' | |
| ) | |
| ->withActionButtonLabel($this->lng->txt('confirm')) | |
| ->withAdditionalOnLoadCode(function ($id) use (&$modal_id) { | |
| $modal_id = $id; | |
| return ''; | |
| }); |
| "close" => $confirmation_modal->getCloseSignal()->getId() | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try:
| "close" => $confirmation_modal->getCloseSignal()->getId() | |
| ] | |
| "close" => $confirmation_modal->getCloseSignal()->getId() | |
| ], | |
| "modal_id" => $modal_id |
| this.unlinkModal = wrapper.querySelector('dialog'); | ||
| this.unlinkConfirmationModal.signals.show = data.signals.show; | ||
| this.unlinkConfirmationModal.signals.close = data.signals.close; | ||
| this.unlinkModalReady = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try:
| this.unlinkModalReady = true; | |
| this.unlinkModalReady = true; | |
| this.unlinkConfirmationModal.modalId = data.modal_id; |
| }, | ||
| unlinkModalAbortController: null, | ||
| unlinkModal: null, | ||
| unlinkModalReady: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try (maybe it should be name unlinkModalId if this all works):
| unlinkModalReady: false, | |
| unlinkModalReady: false, | |
| modalId: null, |
Fixes https://mantis.ilias.de/view.php?id=45000