From 2adcb5a9891e28e2df01d8116664e5a846874ea6 Mon Sep 17 00:00:00 2001 From: "Maruan Aguerdouh (magm)" Date: Thu, 29 Jun 2023 15:06:32 +0000 Subject: [PATCH] [FIX] website_slides: quiz success modal displayed properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After refactoring the modal options to stop using the `Underscore.js` library, the modal was not displayed properly anymore. You can check the behavior by completing a quiz in the website_slides module. If we set the `option` as the target of the `Object.assign()` we then got the optiond properly applied and we got the same behavior as before. Refactoring commit: https://github.com/odoo/odoo/commit/f4f0f783183507df8227b37fe1234c256325df6d opw-3389193 closes odoo/odoo#128132 X-original-commit: 46ed163e39238f7f4d7115711fe9dee93abd4cde Signed-off-by: Warnon Aurélien (awa) --- .../website_slides/static/src/js/slides_course_quiz_finish.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_slides/static/src/js/slides_course_quiz_finish.js b/addons/website_slides/static/src/js/slides_course_quiz_finish.js index 94c5bd6ea34..b96f8b3fff7 100644 --- a/addons/website_slides/static/src/js/slides_course_quiz_finish.js +++ b/addons/website_slides/static/src/js/slides_course_quiz_finish.js @@ -19,13 +19,13 @@ var SlideQuizFinishModal = Dialog.extend({ this.quiz = options.quiz; this.hasNext = options.hasNext; this.userId = options.userId; - options = Object.assign({ + options = Object.assign(options || {}, { size: 'medium', dialogClass: 'd-flex p-0', technical: false, renderHeader: false, renderFooter: false - }, options || {}); + }); this._super.apply(this, arguments); this.opened(function () { self._animateProgressBar();