Add animation class to the form

[MAILPOET-3088]
This commit is contained in:
Pavel Dohnal
2020-09-09 15:16:59 +02:00
committed by Veljko V
parent 4fd7a49524
commit dfcc8f8ba6
3 changed files with 6 additions and 0 deletions

View File

@@ -85,6 +85,10 @@ jQuery(($) => {
const form = formDiv.find('form');
const position = form.data('position');
formDiv.addClass(`mailpoet_form_position_${position}`);
const animation = form.data('animation');
if (animation !== '') {
formDiv.addClass(`mailpoet_form_animation_${animation}`);
}
const background = form.data('background-color');
formDiv.css('background-color', background || 'white');
let delay = form.data('delay');