[FIX] website_form: Disable form send on editable mode
Before this patch, when a user was editing a website page containing a form and he clicked "Send", for some reason, the form tried to be sent. Now, the button behavior is disabled when entering editable mode. Closes #23852
This commit is contained in:
committed by
Romain Derie
parent
fc6d98df24
commit
30aa75329c
@@ -13,7 +13,11 @@ odoo.define('website_form.animation', function (require) {
|
||||
snippet_animation.registry.form_builder_send = snippet_animation.Class.extend({
|
||||
selector: '.s_website_form',
|
||||
|
||||
start: function() {
|
||||
start: function(editable_mode) {
|
||||
if (editable_mode) {
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
var self = this;
|
||||
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);});
|
||||
|
||||
Reference in New Issue
Block a user