diff options
Diffstat (limited to 'addons/website_event/static/src/js/website_event.js')
| -rw-r--r-- | addons/website_event/static/src/js/website_event.js | 23 |
1 files changed, 23 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 new file mode 100644 index 00000000000..f6a4328def4 --- /dev/null +++ b/addons/website_event/static/src/js/website_event.js @@ -0,0 +1,23 @@ +$(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) { + ev.preventDefault(); + ev.stopPropagation(); + var $form = $(ev.currentTarget).closest('form'); + var post = {}; + $("select").each(function() { + post[$(this)[0].name] = $(this).val(); + }); + openerp.jsonRpc($form.attr('action'), 'call', post).then(function (modal) { + var $modal = $(modal); + $modal.appendTo($form).modal() + $modal.on('click', '.js_goto_event', function () { + $modal.modal('hide'); + }); + }); + }); +}); |
