| @@ -7,24 +7,20 @@ | ||
| 7 | 7 | if ($edition) { |
| 8 | 8 | echo '<form action="#" onsubmit="return false;" id="'.esc_attr($form->form_tag_name).'">'; |
| 9 | 9 | } else { |
| 10 | 10 | $cookieExpiration = empty($form->settings['cookie']['cookie_expiration']) ? '1' : $form->settings['cookie']['cookie_expiration']; |
| 11 | - echo '<form | |
| 12 | - acym-data-id="'.esc_attr($form->id).'" | |
| 11 | + echo '<form | |
| 12 | + acym-data-id="'.esc_attr($form->id).'" | |
| 13 | 13 | acym-data-cookie="'.intval($cookieExpiration).'" |
| 14 | 14 | action="'.esc_url($form->form_tag_action).'" |
| 15 | 15 | id="'.esc_attr($form->form_tag_name).'" |
| 16 | 16 | name="'.esc_attr($form->form_tag_name).'" |
| 17 | - enctype="multipart/form-data" | |
| 17 | + aria-label="'.esc_attr(acym_translation('ACYM_SUBSCRIPTION')).'" | |
| 18 | + enctype="multipart/form-data" | |
| 18 | 19 | onsubmit="return submitAcymForm(\'subscribe\',\''.esc_attr($form->form_tag_name).'\', \'acymSubmitSubForm\');">'; |
| 19 | 20 | } |
| 20 | - $files = [ | |
| 21 | - 0 => $form->settings['style']['position'] == 'button-right' ? 'fields' : 'button', | |
| 22 | - 1 => $form->settings['style']['position'] == 'button-right' ? 'button' : 'fields', | |
| 23 | - ]; | |
| 24 | - | |
| 25 | - include acym_getPartial('forms', $files[0]); | |
| 26 | - include acym_getPartial('forms', $files[1]); | |
| 21 | + include acym_getPartial('forms', 'fields'); | |
| 22 | + include acym_getPartial('forms', 'button'); | |
| 27 | 23 | include acym_getPartial('forms', 'hidden_params'); |
| 28 | 24 | |
| 29 | 25 | echo '</form>'; |
| 30 | 26 | ?> |
| @@ -62,11 +58,40 @@ | ||
| 62 | 58 | justify-content: center; |
| 63 | 59 | align-items: center |
| 64 | 60 | } |
| 65 | 61 | |
| 62 | + <?php if (($form->settings['style']['position'] ?? '') !== 'button-right') { ?> | |
| 63 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__button{ | |
| 64 | + order: -1; | |
| 65 | + } | |
| 66 | + <?php } ?> | |
| 67 | + | |
| 66 | 68 | <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?> |
| 67 | 69 | .acym__users__creation__fields__title{ |
| 68 | 70 | margin: 0.5rem |
| 71 | + } | |
| 72 | + | |
| 73 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header, | |
| 74 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header <?php echo '#'.esc_html($form->form_tag_name); ?>, | |
| 75 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields{ | |
| 76 | + flex-wrap: wrap; | |
| 77 | + max-width: 100%; | |
| 78 | + } | |
| 79 | + | |
| 80 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header{ | |
| 81 | + height: auto; | |
| 82 | + min-height: <?php echo esc_html($form->settings['style']['size']['height']); ?>px; | |
| 83 | + } | |
| 84 | + | |
| 85 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield{ | |
| 86 | + width: auto; | |
| 87 | + } | |
| 88 | + | |
| 89 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), | |
| 90 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield select, | |
| 91 | + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield textarea{ | |
| 92 | + width: auto; | |
| 93 | + max-width: 220px; | |
| 69 | 94 | } |
| 70 | 95 | </style> |
| 71 | 96 | <?php if (!$edition) { ?> |
| 72 | 97 | <script type="text/javascript"> |