| @@ -1,0 +1,42 @@ | ||
| 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__button"> | |
| 6 | + <?php | |
| 7 | + if (empty($form->settings['button']['text'])) { | |
| 8 | + $form->settings['button']['text'] = 'ACYM_SUBSCRIBE'; | |
| 9 | + } | |
| 10 | + | |
| 11 | + if (acym_isMultilingual()) { | |
| 12 | + $defaultLanguage = $this->config->get('multilingual_default'); | |
| 13 | + $currentLanguageTag = acym_getLanguageTag(); | |
| 14 | + | |
| 15 | + if (!empty($form->settings['button']['lang'][$currentLanguageTag])) { | |
| 16 | + $form->settings['button']['text'] = $form->settings['button']['lang'][$currentLanguageTag]; | |
| 17 | + } elseif (!empty($form->settings['button']['lang'][$defaultLanguage])) { | |
| 18 | + $form->settings['button']['text'] = $form->settings['button']['lang'][$defaultLanguage]; | |
| 19 | + } | |
| 20 | + } | |
| 21 | + ?> | |
| 22 | + <button type="submit"> | |
| 23 | + <?php echo esc_html(acym_translation($form->settings['button']['text'])); ?> | |
| 24 | + </button> | |
| 25 | + <style> | |
| 26 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name).' '; ?>.acym__subscription__form__button{ | |
| 27 | + display: flex; | |
| 28 | + justify-content: center; | |
| 29 | + align-items: center | |
| 30 | + } | |
| 31 | + | |
| 32 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name).' '; ?>.acym__subscription__form__button button{ | |
| 33 | + background-color: <?php echo esc_html($form->settings['button']['background_color']); ?>; | |
| 34 | + color: <?php echo esc_html($form->settings['button']['text_color']); ?>; | |
| 35 | + border-width: <?php echo esc_html($form->settings['button']['border_size']); ?>px; | |
| 36 | + border-style: <?php echo esc_html($form->settings['button']['border_type']); ?>; | |
| 37 | + border-color: <?php echo esc_html($form->settings['button']['border_color']); ?>; | |
| 38 | + border-radius: <?php echo esc_html($form->settings['button']['border_radius']); ?>px; | |
| 39 | + padding: <?php echo esc_html($form->settings['button']['size']['height']); ?>px <?php echo esc_html($form->settings['button']['size']['width']); ?>px; | |
| 40 | + } | |
| 41 | + </style> | |
| 42 | +</div> | |