[FIX] website: never hide countdowns with redirect action in edit mode
When editing a countdown with a redirect action, sometimes the countdown block will be hidden when toggling the "Hide countdown at the end" option. The problem is caused by the button that allows previewing and editing the end message of the countdown, this button does not apply in the case of a redirect action though. However, the button can still be activated by selecting a different end action first and switching to the redirect action afterwards, in which case it will incorrectly hide the countdown. task-2638366 closes odoo/odoo#81557 X-original-commit: 7f6ebee33e8a82d7ccdf155c3a543898b187389c Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -41,6 +41,9 @@ options.registry.countdown = options.Class.extend({
|
||||
this.$target.toggleClass('hide-countdown', widgetValue === 'message_no_countdown');
|
||||
} else {
|
||||
const $message = this.$target.find('.s_countdown_end_message').detach();
|
||||
if (this.showEndMessage) {
|
||||
this._onToggleEndMessageClick();
|
||||
}
|
||||
if ($message.length) {
|
||||
this.endMessage = $message[0].outerHTML;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user