[FIX] website_event: Traceback after reanaming Register button

Issue

	- Install "Events" module
	- Go to website and select an event
	- Edit (in frontend) the event and replace the
	"Register" button text
	- Save & Close the editor
	- Try to register to the event

	Traceback raised

Cause

	Due to this fix on 13.0 (https://github.com/odoo/odoo/commit/8579c0cae839c615415120b79d6ec22c71f7affd),
	the replaced arch will override the style/class if has one.
	In the related ticket; after renaming the "Register" button,
	the 'a-submit' class was removed at rendering, and so,
	after renaming, the class is not present in the new button
	while it's needed to fetch register buttons.

Solution

	Do not remove 'a-submit' class from button since needed in js
	to fetch register buttons.

opw-2317119

closes odoo/odoo#55884

X-original-commit: 593a471cc0a65c12416fa97ef583a9ac9392cc73
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
This commit is contained in:
Nasreddin (bon)
2020-08-13 13:41:07 +00:00
parent 09cb4533c2
commit eab69bcabf
@@ -18,7 +18,6 @@ var EventRegistrationForm = Widget.extend({
var res = this._super.apply(this.arguments).then(function () {
$('#registration_form .a-submit')
.off('click')
.removeClass('a-submit')
.click(function (ev) {
self.on_click(ev);
});