odoo.define('website_event.website_event', function (require) {

var ajax = require('web.ajax');

$(document).ready(function () {

    // Catch registration form event, because of JS for attendee details
    $('#registration_form .a-submit')
        .off('click')
        .removeClass('a-submit')
        .click(function (ev) {
            $(this).attr('disabled', true);
            ev.preventDefault();
            ev.stopPropagation();
            var $form = $(ev.currentTarget).closest('form');
            var post = {};
            $("select").each(function() {
                post[$(this)[0].name] = $(this).val();
            });
            ajax.jsonRpc($form.attr('action'), 'call', post).then(function (modal) {
                var $modal = $(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');
                });
            });
        });
});

});

@@ -489,24 +489,59 @@
 st('form');%0A
+            var $button = $(this);%0A
             
@@ -555,16 +555,16 @@
 t = %7B%7D;%0A
-
         
@@ -749,24 +749,215 @@
 n (modal) %7B%0A
+                // Only needed for 9.0 up to saas-14%0A                if (modal === false) %7B%0A                    $button.prop('disabled', false);%0A                    return;%0A                %7D%0A
             
@@ -1135,17 +1135,23 @@
  $modal.
-a
+insertA
 fter($fo
@@ -1226,24 +1226,24 @@
 nction () %7B%0A
-
             
@@ -1268,24 +1268,77 @@
 al('hide');%0A
+                    $button.prop('disabled', false);%0A
             

unblock button when no reserve