summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-10-26 18:33:33 +0200
committerChristophe Simonis <chs@odoo.com>2017-10-26 18:33:33 +0200
commitbbc226cd6cc17c69979f81831a3da8cc668bf064 (patch)
treee229263928f810380d0062c9b2083746e43ad8e9 /addons
parent7a0342682660fd90befe5712c1307baa2373ce4f (diff)
parent809aaf9e7b9de28383444d5059b19a67bb513f51 (diff)
[MERGE] forward port branch 9.0 up to 809aaf9e7b9
Diffstat (limited to 'addons')
-rw-r--r--addons/website/static/src/js/website.js2
-rw-r--r--addons/website_event/static/src/js/website_event.js4
-rw-r--r--addons/website_event/views/website_event_templates.xml4
-rw-r--r--addons/website_event_questions/views/website_event_questions_templates.xml2
4 files changed, 7 insertions, 5 deletions
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', '<i class="fa fa-spinner fa-spin"></i> ' + $(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 @@
<template id="registration_attendee_details" name="Registration Attendee Details">
<div id="modal_attendees_registration" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
- <form id="attendee_registration" t-attf-action="/event/#{slug(event)}/registration/confirm" method="post">
+ <form id="attendee_registration" t-attf-action="/event/#{slug(event)}/registration/confirm" method="post" class="js_website_submit_form">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<div class="modal-content">
<div class="modal-header">
@@ -468,7 +468,7 @@
<h4 class="modal-title" id="myModalLabel"><strong>Attendees</strong></h4>
</div>
<div class="modal-body">
- <div class="container">
+ <div class="">
<t t-set="counter_type" t-value="1"/>
<t t-set="counter" t-value="0"/>
<t t-foreach="tickets" t-as="ticket">
diff --git a/addons/website_event_questions/views/website_event_questions_templates.xml b/addons/website_event_questions/views/website_event_questions_templates.xml
index 6b47483fd44..b27abbfd259 100644
--- a/addons/website_event_questions/views/website_event_questions_templates.xml
+++ b/addons/website_event_questions/views/website_event_questions_templates.xml
@@ -30,7 +30,7 @@
</xpath>
<!-- Generic questions -->
- <xpath expr="//div[@class='container']/t[last()]" position="after">
+ <xpath expr="//div[hasclass('modal-body')]/div/t[last()]" position="after">
<t t-if="event.general_question_ids">
<h4 class="page-header mt8"><strong>Common Questions</strong></h4>
<div>