[FIX] website_event: typo tickets not disappear

Since 809aaf9e, when clicking on "Register Now" on a ticket registering
page, the ticket list disappeared because of a typo.

opw-1841488
closes #24607
This commit is contained in:
Nicolas Lempereur
2018-05-08 13:53:29 +02:00
parent 7f632f909e
commit e9454e79e2
@@ -41,6 +41,7 @@ var EventRegistrationForm = Widget.extend({
ev.preventDefault();
ev.stopPropagation();
var $form = $(ev.currentTarget).closest('form');
var $button = $(ev.currentTarget).closest('[type="submit"]');
var post = {};
$('#registration_form select').each(function () {
post[$(this).attr('name')] = $(this).val();
@@ -54,9 +55,10 @@ var EventRegistrationForm = Widget.extend({
return 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.insertAfter($form).modal();
$modal.on('click', '.js_goto_event', function () {
$modal.modal('hide');
$button.prop('disabled', false);
});
});
}