diff options
| author | Paramjit Singh Sahota <psa@openerp.com> | 2014-07-16 14:38:10 +0530 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-10-09 10:09:06 +0200 |
| commit | ca862e7b852996cb44c444b5725beca8a5d8ae65 (patch) | |
| tree | 57f6aa7f5de2da399c3469c14220e236d84d5453 /addons/website_event/static/src | |
| parent | b7eb97c39ebd7b667e1691eeea72f716fa11b420 (diff) | |
[IMP] event: Split Ticket: registration are now for one attendee only.
Registration are now for one attendee only. When buying several seats for an event
you have now one registration for each attendee.
event: nb_register field is removed; as well as unnecessary user_id and it subscribe /
unsubscribe behavior. Also slighly cleaned some views.
event_sale: do not auto confirm registrations linked to a draft sale order. Note: strange
origin is a char field, not a sale_order_id. Added a small wizard to edit attendees
data when confirming a sale order containing event related lines.
website_event: when buying free tickets, ask for attendee details. Added template,
controllers to handle that behavior.
website_event_sale: when buying tickets, ask for attendee details. Events ecommerce
should be better integrated with online events, using inheritance to add details
instead of being very different.
Diffstat (limited to 'addons/website_event/static/src')
| -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'); + }); + }); + }); +}); |
