| @@ -1,14 +1,21 @@ | ||
| 1 | -<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> | |
| 2 | - | |
| 1 | +<?php if ( ! defined( 'ABSPATH' ) ) { exit;} // Exit if accessed directly ?> | |
| 2 | +<?php | |
| 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 ?? ''; | |
| 9 | +?> | |
| 3 | 10 | <div id="fcom_user_onboard_wrap" class="fcom_user_onboard"> |
| 4 | 11 | <?php do_action('fluent_community/before_auth_form_header', 'signup'); ?> |
| 5 | 12 | <div class="fcom_onboard_header"> |
| 6 | 13 | <div class="fcom_onboard_header_title"> |
| 7 | 14 | <h2> |
| 8 | - <?php echo esc_html($title); ?> | |
| 15 | + <?php echo esc_html($fluentCommunityTitle); ?> | |
| 9 | 16 | </h2> |
| 10 | - <p><?php echo wp_kses_post($description); ?></p> | |
| 17 | + <p><?php echo wp_kses_post($fluentCommunityDescription); ?></p> | |
| 11 | 18 | </div> |
| 12 | 19 | </div> |
| 13 | 20 | <div class="fcom_onboard_body"> |
| 14 | 21 | <div class="fcom_onboard_form"> |
| @@ -16,13 +23,13 @@ | ||
| 16 | 23 | <?php do_action('fluent_community/before_registration_form'); ?> |
| 17 | 24 | |
| 18 | 25 | <form method="post" id="fcom_user_registration_form"> |
| 19 | 26 | <div class="fcom_form_main_fields"> |
| 20 | - <?php (new \FluentCommunity\App\Services\FormBuilder($formFields))->render(); ?> | |
| 27 | + <?php (new \FluentCommunity\App\Services\FormBuilder($fluentCommunityFormFields))->render(); ?> | |
| 21 | 28 | <?php |
| 22 | - foreach ($hiddenFields as $fluentCommunityName => $fluentCommunityValue) { | |
| 23 | - echo "<input type='hidden' name='".esc_attr($fluentCommunityName)."' value='".esc_attr($fluentCommunityValue)."'>"; | |
| 24 | - } | |
| 29 | + foreach ($fluentCommunityHiddenFields as $fluentCommunityName => $fluentCommunityValue) { | |
| 30 | + echo "<input type='hidden' name='".esc_attr($fluentCommunityName)."' value='".esc_attr($fluentCommunityValue)."'>"; | |
| 31 | + } | |
| 25 | 32 | ?> |
| 26 | 33 | <div class="fcom_form-group"> |
| 27 | 34 | <div class="fcom_form_input"> |
| 28 | 35 | <button type="submit" class="fcom_btn fcom_btn_primary has_svg_loader fcom_btn_submit"> |
| @@ -31,9 +38,9 @@ | ||
| 31 | 38 | <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/> |
| 32 | 39 | </path> |
| 33 | 40 | </svg> |
| 34 | 41 | <span> |
| 35 | - <?php echo esc_html($button_label); ?> | |
| 42 | + <?php echo esc_html($fluentCommunityButtonLabel); ?> | |
| 36 | 43 | </span> |
| 37 | 44 | </button> |
| 38 | 45 | </div> |
| 39 | 46 | </div> |