| @@ -1,29 +1,47 @@ | ||
| 1 | -<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> | |
| 1 | +<?php if ( ! defined( 'ABSPATH' ) ) { exit;} // Exit if accessed directly ?> | |
| 2 | 2 | <?php |
| 3 | -$formBuilder = new \FluentCommunity\App\Services\FormBuilder($formFields); | |
| 3 | +/** @var string $title @var string $description @var array $formFields @var array $hiddenFields @var string $button_label */ | |
| 4 | +$fluentCommunityTitle = $title ?? ''; | |
| 5 | +$fluentCommunityDescription = $description ?? ''; | |
| 6 | +$fluentCommunityFormFields = $formFields ?? []; | |
| 7 | +$fluentCommunityHiddenFields = $hiddenFields ?? []; | |
| 8 | +$fluentCommunityButtonLabel = $button_label ?? ''; | |
| 4 | 9 | ?> |
| 5 | 10 | <div id="fcom_user_onboard_wrap" class="fcom_user_onboard"> |
| 11 | + <?php do_action('fluent_community/before_auth_form_header', 'signup'); ?> | |
| 6 | 12 | <div class="fcom_onboard_header"> |
| 7 | 13 | <div class="fcom_onboard_header_title"> |
| 8 | - <h2><?php echo esc_html($title); ?></h2> | |
| 9 | - <p><?php echo esc_html($description); ?></p> | |
| 14 | + <h2> | |
| 15 | + <?php echo esc_html($fluentCommunityTitle); ?> | |
| 16 | + </h2> | |
| 17 | + <p><?php echo wp_kses_post($fluentCommunityDescription); ?></p> | |
| 10 | 18 | </div> |
| 11 | 19 | </div> |
| 12 | 20 | <div class="fcom_onboard_body"> |
| 13 | 21 | <div class="fcom_onboard_form"> |
| 22 | + | |
| 23 | + <?php do_action('fluent_community/before_registration_form'); ?> | |
| 24 | + | |
| 14 | 25 | <form method="post" id="fcom_user_registration_form"> |
| 15 | 26 | <div class="fcom_form_main_fields"> |
| 16 | - <?php $formBuilder->render(); ?> | |
| 27 | + <?php (new \FluentCommunity\App\Services\FormBuilder($fluentCommunityFormFields))->render(); ?> | |
| 17 | 28 | <?php |
| 18 | - foreach ($hiddenFields as $name => $value) { | |
| 19 | - echo "<input type='hidden' name='".esc_attr($name)."' value='".esc_attr($value)."'>"; | |
| 29 | + foreach ($fluentCommunityHiddenFields as $fluentCommunityName => $fluentCommunityValue) { | |
| 30 | + echo "<input type='hidden' name='".esc_attr($fluentCommunityName)."' value='".esc_attr($fluentCommunityValue)."'>"; | |
| 20 | 31 | } |
| 21 | 32 | ?> |
| 22 | 33 | <div class="fcom_form-group"> |
| 23 | 34 | <div class="fcom_form_input"> |
| 24 | - <button type="submit" class="fcom_btn fcom_btn_primary"> | |
| 25 | - <?php echo wp_kses_post($signupBtnText); ?> | |
| 35 | + <button type="submit" class="fcom_btn fcom_btn_primary has_svg_loader fcom_btn_submit"> | |
| 36 | + <svg version="1.1" class="fls_loading_svg" x="0px" y="0px" width="40px" height="20px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve"> | |
| 37 | + <path fill="currentColor" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"> | |
| 38 | + <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/> | |
| 39 | + </path> | |
| 40 | + </svg> | |
| 41 | + <span> | |
| 42 | + <?php echo esc_html($fluentCommunityButtonLabel); ?> | |
| 43 | + </span> | |
| 26 | 44 | </button> |
| 27 | 45 | </div> |
| 28 | 46 | </div> |
| 29 | 47 | </div> |
| @@ -30,13 +48,15 @@ | ||
| 30 | 48 | </form> |
| 31 | 49 | |
| 32 | 50 | <?php if(!empty($loginUrl)): ?> |
| 33 | 51 | <div class="fcom_spaced_divider"> |
| 34 | - <?php _e('Already have an account?', 'fluent-community'); ?> | |
| 52 | + <?php esc_html_e('Already have an account?', 'fluent-community'); ?> | |
| 35 | 53 | <a href="<?php echo esc_url($loginUrl); ?>"> |
| 36 | - <?php _e('Login', 'fluent-community'); ?> | |
| 54 | + <?php esc_html_e('Login', 'fluent-community'); ?> | |
| 37 | 55 | </a> |
| 38 | 56 | </div> |
| 39 | 57 | <?php endif; ?> |
| 58 | + | |
| 59 | + <?php do_action('fluent_community/after_registration_form'); ?> | |
| 40 | 60 | </div> |
| 41 | 61 | </div> |
| 42 | 62 | </div> |