| @@ -1,4 +1,8 @@ | ||
| 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 | +?> | |
| 1 | 5 | <div class="acym__subscription__form__button"> |
| 2 | 6 | <?php |
| 3 | 7 | if (empty($form->settings['button']['text'])) { |
| 4 | 8 | $form->settings['button']['text'] = 'ACYM_SUBSCRIBE'; |
| @@ -13,29 +17,26 @@ | ||
| 13 | 17 | } elseif (!empty($form->settings['button']['lang'][$defaultLanguage])) { |
| 14 | 18 | $form->settings['button']['text'] = $form->settings['button']['lang'][$defaultLanguage]; |
| 15 | 19 | } |
| 16 | 20 | } |
| 17 | - | |
| 18 | - $onclick = $edition ? '' | |
| 19 | - : 'onclick="try{ return submitAcymForm(\'subscribe\',\''.$form->form_tag_name.'\', \'acymSubmitSubForm\'); }catch(err){alert(\'The form could not be submitted \'+err);return false;}"'; | |
| 20 | 21 | ?> |
| 21 | - <button type="button" <?php echo $onclick; ?>> | |
| 22 | - <?php echo $button_value = acym_translation($form->settings['button']['text']); ?> | |
| 22 | + <button type="submit"> | |
| 23 | + <?php echo esc_html(acym_translation($form->settings['button']['text'])); ?> | |
| 23 | 24 | </button> |
| 24 | 25 | <style> |
| 25 | - <?php echo '#acym_fulldiv_'.$form->form_tag_name.' '; ?>.acym__subscription__form__button{ | |
| 26 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name).' '; ?>.acym__subscription__form__button{ | |
| 26 | 27 | display: flex; |
| 27 | 28 | justify-content: center; |
| 28 | 29 | align-items: center |
| 29 | 30 | } |
| 30 | 31 | |
| 31 | - <?php echo '#acym_fulldiv_'.$form->form_tag_name.' '; ?>.acym__subscription__form__button button{ | |
| 32 | - background-color: <?php echo $form->settings['button']['background_color']; ?>; | |
| 33 | - color: <?php echo $form->settings['button']['text_color']; ?>; | |
| 34 | - border-width: <?php echo $form->settings['button']['border_size']; ?>px; | |
| 35 | - border-style: <?php echo $form->settings['button']['border_type']; ?>; | |
| 36 | - border-color: <?php echo $form->settings['button']['border_color']; ?>; | |
| 37 | - border-radius: <?php echo $form->settings['button']['border_radius']; ?>px; | |
| 38 | - padding: <?php echo $form->settings['button']['size']['height']; ?>px <?php echo $form->settings['button']['size']['width']; ?>px; | |
| 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; | |
| 39 | 40 | } |
| 40 | 41 | </style> |
| 41 | 42 | </div> |