diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 5ab4aca782c..3c063ba60dc 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -218,7 +218,7 @@ odoo.define('website.website', function (require) { init_kanban(this); }); - $('.js_website_submit_form').on('submit', function () { + $('body').on('submit', '.js_website_submit_form', function() { var $buttons = $(this).find('button[type="submit"], a.a-submit'); _.each($buttons, function (btn) { $(btn).attr('data-loading-text', ' ' + $(btn).text()).button('loading'); diff --git a/addons/website_event/static/src/js/website_event.js b/addons/website_event/static/src/js/website_event.js index cb531d0035a..2038494a3e5 100644 --- a/addons/website_event/static/src/js/website_event.js +++ b/addons/website_event/static/src/js/website_event.js @@ -13,6 +13,7 @@ var EventRegistrationForm = Widget.extend({ .off('click') .removeClass('a-submit') .click(function (ev) { + $(this).attr('disabled', true); self.on_click(ev); }); }); @@ -28,7 +29,8 @@ var EventRegistrationForm = Widget.extend({ }); return ajax.jsonRpc($form.attr('action'), 'call', post).then(function (modal) { var $modal = $(modal); - $modal.appendTo($form).modal(); + $modal.find('.modal-body > div').removeClass('container'); // retrocompatibility - REMOVE ME in master / saas-19 + $modal.after($form).modal(); $modal.on('click', '.js_goto_event', function () { $modal.modal('hide'); }); diff --git a/addons/website_event/views/website_event_templates.xml b/addons/website_event/views/website_event_templates.xml index f260c8506a5..c4cd4441938 100644 --- a/addons/website_event/views/website_event_templates.xml +++ b/addons/website_event/views/website_event_templates.xml @@ -460,7 +460,7 @@