| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. |
| 3 |
defined('ABSPATH') || die('Restricted Access'); |
| 4 |
?> |
| 5 |
<div id="acym_fulldiv_<?php echo esc_attr($form->form_tag_name); ?>" class="acym__subscription__form__footer acym__subscription__form-erase"> |
| 6 |
<?php |
| 7 |
if ($edition) { |
| 8 |
echo '<form action="#" onsubmit="return false;" id="'.esc_attr($form->form_tag_name).'">'; |
| 9 |
} else { |
| 10 |
$cookieExpiration = empty($form->settings['cookie']['cookie_expiration']) ? '1' : $form->settings['cookie']['cookie_expiration']; |
| 11 |
echo '<form acym-data-id="'.esc_attr($form->id).'" |
| 12 |
acym-data-cookie="'.intval($cookieExpiration).'" |
| 13 |
action="'.esc_url($form->form_tag_action).'" |
| 14 |
id="'.esc_attr($form->form_tag_name).'" |
| 15 |
name="'.esc_attr($form->form_tag_name).'" |
| 16 |
enctype="multipart/form-data" |
| 17 |
onsubmit="return submitAcymForm(\'subscribe\',\''.esc_attr($form->form_tag_name).'\', \'acymSubmitSubForm\')">'; |
| 18 |
} |
| 19 |
$files = [ |
| 20 |
0 => $form->settings['style']['position'] == 'button-right' ? 'fields' : 'button', |
| 21 |
1 => $form->settings['style']['position'] == 'button-right' ? 'button' : 'fields', |
| 22 |
]; |
| 23 |
|
| 24 |
include acym_getPartial('forms', $files[0]); |
| 25 |
include acym_getPartial('forms', $files[1]); |
| 26 |
include acym_getPartial('forms', 'hidden_params'); |
| 27 |
|
| 28 |
echo '</form>'; |
| 29 |
?> |
| 30 |
</div> |
| 31 |
<style> |
| 32 |
<?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__footer{ |
| 33 |
position: fixed; |
| 34 |
bottom: 0; |
| 35 |
right: 0; |
| 36 |
left: 0; |
| 37 |
height: <?php echo esc_html($form->settings['style']['size']['height']); ?>px; |
| 38 |
background-color: <?php echo esc_html($form->settings['style']['background_color']); ?>; |
| 39 |
color: <?php echo esc_html($form->settings['style']['text_color']); ?> !important; |
| 40 |
padding: .5rem; |
| 41 |
z-index: 999999; |
| 42 |
text-align: center; |
| 43 |
display: flex; |
| 44 |
justify-content: center; |
| 45 |
align-items: center |
| 46 |
} |
| 47 |
|
| 48 |
<?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__footer .responseContainer{ |
| 49 |
margin-bottom: 0 !important; |
| 50 |
padding: .4rem !important; |
| 51 |
} |
| 52 |
|
| 53 |
<?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__footer <?php echo '#'.esc_html($form->form_tag_name); ?>{ |
| 54 |
margin: 0; |
| 55 |
display: flex; |
| 56 |
justify-content: center; |
| 57 |
align-items: center |
| 58 |
} |
| 59 |
|
| 60 |
<?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__footer .acym__subscription__form__fields, <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__footer .acym__subscription__form__button{ |
| 61 |
display: flex; |
| 62 |
justify-content: center; |
| 63 |
align-items: center |
| 64 |
} |
| 65 |
|
| 66 |
<?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?> |
| 67 |
.acym__users__creation__fields__title{ |
| 68 |
margin: 0.5rem |
| 69 |
} |
| 70 |
</style> |
| 71 |
<?php if (!$edition) include acym_getPartial('forms', 'cookie'); ?> |
| 72 |
|