| @@ -1,0 +1,44 @@ | ||
| 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 class="acym__subscription__form__lists" role="group" aria-label="<?php echo esc_attr(acym_translation('ACYM_NEWSLETTERS')); ?>"> | |
| 6 | + <?php | |
| 7 | + foreach ($form->settings['lists']['displayed'] as $listId) { | |
| 8 | + if (!empty($form->settings['lists']['automatic_subscribe']) && in_array($listId, $form->settings['lists']['automatic_subscribe'])) continue; | |
| 9 | + if (empty($form->lists[$listId])) continue; | |
| 10 | + $label = $form->lists[$listId]; | |
| 11 | + ?> | |
| 12 | + <label> | |
| 13 | + <input type="checkbox" | |
| 14 | + value="<?php echo esc_attr($listId); ?>" | |
| 15 | + name="subscription[]" | |
| 16 | + <?php checked(!empty($form->settings['lists']['checked']) && in_array($listId, $form->settings['lists']['checked'])); ?>> | |
| 17 | + <?php echo esc_html($label); ?> | |
| 18 | + </label> | |
| 19 | + <?php | |
| 20 | + } | |
| 21 | + | |
| 22 | + $hiddenLists = empty($form->settings['lists']['automatic_subscribe']) ? '' : implode(',', $form->settings['lists']['automatic_subscribe']); | |
| 23 | + echo '<input type="hidden" name="hiddenlists" value="'.esc_attr($hiddenLists).'">'; | |
| 24 | + ?> | |
| 25 | + <style> | |
| 26 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name).' '; ?>.acym__subscription__form__fields .acym__subscription__form__lists{ | |
| 27 | + display: inline-block; | |
| 28 | + width: auto; | |
| 29 | + margin: 0 20px; | |
| 30 | + text-align: left; | |
| 31 | + } | |
| 32 | + | |
| 33 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name).' '; ?>.acym__subscription__form__fields .acym__subscription__form__lists label{ | |
| 34 | + display: inline-block; | |
| 35 | + margin-right: 10px; | |
| 36 | + width: auto; | |
| 37 | + } | |
| 38 | + | |
| 39 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name).' '; ?>.acym__subscription__form__fields .acym__subscription__form__lists input[type="checkbox"]{ | |
| 40 | + margin-top: 0 !important; | |
| 41 | + margin-right: 5px; | |
| 42 | + } | |
| 43 | + </style> | |
| 44 | +</div> | |