summaryrefslogtreecommitdiff
path: root/addons/website_event/static/src
diff options
context:
space:
mode:
authorAdrien Peiffer (ACSONE) <adrien.peiffer@acsone.eu>2018-06-10 13:24:49 +0200
committerThibault Delavallée <tde@odoo.com>2018-06-11 11:23:28 +0200
commit52f5bb27cedf20caca7f60310fdc64cb8a716c1b (patch)
tree11aac902813ba8973b328baefcd03d5ed498dc39 /addons/website_event/static/src
parent56e8a4a82aeb8a72d8cf95114424bcb5f1396261 (diff)
[FIX] website_event: improve registration modal behavior
Currently there are 3 ways of going out of the modal: clicking cancel registration, hitting the close button or clicking outside the modal. The latter one however does not trigger the close event for modals and therefore buttons of event registration are not reset correctly. This commit fixes that behavior by preventing to close modal by clicking outside of it. Buttons should be used and flow is now fixed. Closes #25174 .
Diffstat (limited to 'addons/website_event/static/src')
-rw-r--r--addons/website_event/static/src/js/website_event.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/website_event/static/src/js/website_event.js b/addons/website_event/static/src/js/website_event.js
index 81192b03e0f..1db875927b7 100644
--- a/addons/website_event/static/src/js/website_event.js
+++ b/addons/website_event/static/src/js/website_event.js
@@ -35,12 +35,16 @@ var EventRegistrationForm = Widget.extend({
return;
}
var $modal = $(modal);
+ $modal.modal({backdrop: 'static', keyboard: false});
$modal.find('.modal-body > div').removeClass('container'); // retrocompatibility - REMOVE ME in master / saas-19
$modal.insertAfter($form).modal();
$modal.on('click', '.js_goto_event', function () {
$modal.modal('hide');
$button.prop('disabled', false);
});
+ $modal.on('click', '.close', function () {
+ $button.prop('disabled', false);
+ });
});
},
});