| 1 |
<?php |
| 2 |
/** |
| 3 |
* Register template (default) |
| 4 |
* |
| 5 |
* @ver 1.2.41 |
| 6 |
*/ |
| 7 |
|
| 8 |
global $aui_bs5; |
| 9 |
|
| 10 |
$css_class = ! empty( $args['css_class'] ) ? esc_attr( $args['css_class'] ) : 'border-0'; |
| 11 |
$form_title = ! empty( $args['form_title'] ) || $args['form_title']=='0' ? esc_attr__( $args['form_title'], 'userswp' ) : __( 'Register', 'userswp' ); |
| 12 |
$form_title = apply_filters( 'uwp_template_form_title', $form_title, 'register' ); |
| 13 |
$button_title = uwp_get_option( 'register_form_button_title' ); |
| 14 |
if ( $button_title ) { |
| 15 |
$button_title = __( wp_unslash( $button_title ), 'userswp' ); |
| 16 |
} else { |
| 17 |
$button_title = __( 'Create account', 'userswp' ); |
| 18 |
} |
| 19 |
$button_title = apply_filters( 'uwp_register_form_button_title', $button_title ); |
| 20 |
do_action( 'uwp_template_before', 'register', $args ); ?> |
| 21 |
<div class="row"> |
| 22 |
<div class="card mx-auto container-fluid p-0 <?php echo esc_attr( $css_class ); ?>" > |
| 23 |
<?php |
| 24 |
// ajax modal |
| 25 |
if(wp_doing_ajax() && $form_title != '0'){ |
| 26 |
?> |
| 27 |
<div class="modal-header"> |
| 28 |
<h5 class="modal-title"><?php echo esc_attr($form_title);?></h5> |
| 29 |
<?php |
| 30 |
echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 31 |
'type' => 'button', |
| 32 |
'class' => 'close', |
| 33 |
'content' => '<span aria-hidden="true">×</span>', |
| 34 |
'extra_attributes' => array('aria-label'=>esc_html__("Close","userswp"), 'data-' . ( $aui_bs5 ? 'bs-' : '' ) . 'dismiss'=>"modal") |
| 35 |
)); |
| 36 |
?> |
| 37 |
</div> |
| 38 |
<?php |
| 39 |
} |
| 40 |
?> |
| 41 |
<div class="card-body"> |
| 42 |
<?php |
| 43 |
do_action( 'uwp_template_form_title_before', 'register', $args ); |
| 44 |
|
| 45 |
if (!wp_doing_ajax() && $form_title != '0' ) { |
| 46 |
echo '<h3 class="card-title text-center mb-4">'; |
| 47 |
echo esc_attr( $form_title ); |
| 48 |
echo '</h3>'; |
| 49 |
} |
| 50 |
|
| 51 |
do_action( 'uwp_template_display_notices', 'register', $args ); ?> |
| 52 |
|
| 53 |
<form class="uwp-registration-form uwp_form" method="post" enctype="multipart/form-data"> |
| 54 |
<?php |
| 55 |
do_action( 'uwp_template_fields', 'register', $args ); |
| 56 |
|
| 57 |
$button_args = apply_filters( 'uwp_register_button_args', array( |
| 58 |
'type' => 'submit', |
| 59 |
'class' => 'btn btn-primary btn-block text-uppercase uwp_register_submit', |
| 60 |
'content' => esc_html( $button_title ), |
| 61 |
'name' => 'uwp_register_submit', |
| 62 |
), $args ); |
| 63 |
|
| 64 |
echo aui()->button( $button_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 65 |
?> |
| 66 |
</form> |
| 67 |
|
| 68 |
<div class="uwp-footer-links"> |
| 69 |
<div class="uwp-footer-link"> |
| 70 |
<?php |
| 71 |
echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 72 |
'type' => 'a', |
| 73 |
'href' => esc_url( uwp_get_login_page_url() ), |
| 74 |
'class' => 'd-block text-center mt-2 small uwp-login-link', |
| 75 |
'content' => uwp_get_option("login_link_title") ? esc_html__( uwp_get_option("login_link_title"), 'userswp') : esc_html__( 'Login', 'userswp' ), |
| 76 |
'extra_attributes' => array('rel'=>'nofollow') |
| 77 |
)); |
| 78 |
?> |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
|
| 82 |
<div class="form-group text-center mb-0 p-0"> |
| 83 |
<?php do_action( 'uwp_social_fields', 'register', $args ); ?> |
| 84 |
</div> |
| 85 |
|
| 86 |
</div> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
<?php do_action( 'uwp_template_after', 'register', $args ); ?> |