From 406cf8e80dccccdc71d51cb48a358a6b76d1ffd6 Mon Sep 17 00:00:00 2001 From: std-odoo Date: Wed, 16 Sep 2020 11:54:45 +0000 Subject: [PATCH] [FIX] website_slides_survey: fix certification share button Bug === In the user profile view, we can see the certifications of the current user. If we click on the share button, we are redirected to the course instead of opening the share modal. Technical ========= Since 1f52435966edeb1d57ef8bccce7f82eb0b08a2ae we use an on-lick event to redirect the user when he click on the card. We use the JS event instead of an standard anchor because nested anchors are forbidden in HTML. That cause an issue if we click on a child anchor and if we stay on the same page (which is the case when we open a bootstrap modal) because the on-click event will be triggered. We can not just stop the click propagation otherwise the modal won't be opened. Also, as the bootstrap modal element (`website_slides.slide_share_modal`) is inside the element with the on-click event, so, if we click anywhere on the modal, we will be redirected... So, the solution is to open manually the modal, to stop the click propagation and to move the modal element. Task-2337693 closes odoo/odoo#59545 X-original-commit: 2a63f98bd359907169d14539feaa99a1d83263f0 Signed-off-by: awa-odoo Signed-off-by: Thibault Delavallee (tde) --- addons/website_slides_survey/views/website_profile.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/website_slides_survey/views/website_profile.xml b/addons/website_slides_survey/views/website_profile.xml index 0679be859de..8d52bb0f189 100644 --- a/addons/website_slides_survey/views/website_profile.xml +++ b/addons/website_slides_survey/views/website_profile.xml @@ -26,18 +26,18 @@ - + - - - + + +