diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-19 12:43:58 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-19 12:43:58 +0100 |
| commit | 2f95cfb8ed2a2e4dda2aee4f1f6f003587f9005c (patch) | |
| tree | b788f0bcbc56b155e35f2af195f1dd0273c8da11 /addons/website_form | |
| parent | fdb585caf597b5a77d241087260ac42e3c3fb94e (diff) | |
| parent | f99c4f2b48b29f19a0d2ee1cd999008c92ab2a89 (diff) | |
[MERGE] forward port branch saas-16 up to f99c4f2b48b
Diffstat (limited to 'addons/website_form')
| -rw-r--r-- | addons/website_form/static/src/js/website_form.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/website_form/static/src/js/website_form.js b/addons/website_form/static/src/js/website_form.js index aa540650473..47ba66c244b 100644 --- a/addons/website_form/static/src/js/website_form.js +++ b/addons/website_form/static/src/js/website_form.js @@ -22,7 +22,7 @@ odoo.define('website_form.animation', function (require) { start: function () { var self = this; - qweb.add_template('/website_form/static/src/xml/website_form.xml'); + this.templates_loaded = ajax.loadXML('/website_form/static/src/xml/website_form.xml', qweb); this.$target.find('.o_website_form_send').on('click',function (e) {self.send(e);}); // Initialize datetimepickers @@ -233,7 +233,10 @@ odoo.define('website_form.animation', function (require) { if (status !== 'success') { // Restore send button behavior if result is an error this.$target.find('.o_website_form_send').on('click',function (e) {self.send(e);}); } - this.$target.find('#o_website_form_result').replaceWith(qweb.render("website_form.status_" + status)); + var $result = this.$('#o_website_form_result'); + this.templates_loaded.done(function () { + $result.replaceWith(qweb.render("website_form.status_" + status)); + }); }, }); }); |
