| 1 |
<?php |
| 2 |
/** |
| 3 |
* Reset template (default) |
| 4 |
* |
| 5 |
* @ver 1.0.0 |
| 6 |
*/ |
| 7 |
$css_class = ! empty( $args['css_class'] ) ? esc_attr( $args['css_class'] ) : 'border-0'; |
| 8 |
$form_title = ! empty( $args['form_title'] ) || $args['form_title']=='0' ? esc_attr__( $args['form_title'], 'userswp' ) : __( 'Reset Password', 'userswp' ); |
| 9 |
$form_title = apply_filters( 'uwp_template_form_title', $form_title, 'reset' ); |
| 10 |
do_action( 'uwp_template_before', 'reset' ); ?> |
| 11 |
<div class="row"> |
| 12 |
<div class="card mx-auto container-fluid p-0 <?php echo esc_attr( $css_class ); ?>" > |
| 13 |
<div class="card-body"> |
| 14 |
<?php |
| 15 |
do_action( 'uwp_template_form_title_before', 'reset' ); |
| 16 |
|
| 17 |
if ( $form_title != '0' ) { |
| 18 |
echo '<h3 class="card-title text-center mb-4">'; |
| 19 |
echo esc_attr( $form_title ); |
| 20 |
echo '</h3>'; |
| 21 |
} |
| 22 |
?> |
| 23 |
|
| 24 |
<?php do_action( 'uwp_template_display_notices', 'reset' ); ?> |
| 25 |
|
| 26 |
<?php if ( isset( $_GET['key'] ) && isset( $_GET['login'] ) ) { ?> |
| 27 |
<form class="uwp-reset-form uwp_form" method="post"> |
| 28 |
<?php |
| 29 |
do_action( 'uwp_template_fields', 'reset' ); |
| 30 |
echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 31 |
'type' => 'submit', |
| 32 |
'class' => 'btn btn-primary btn-block text-uppercase', |
| 33 |
'content' => esc_html__( 'Submit', 'userswp' ), |
| 34 |
'name' => 'uwp_reset_submit', |
| 35 |
)); |
| 36 |
?> |
| 37 |
</form> |
| 38 |
<?php } else { |
| 39 |
echo aui()->alert(array('type'=>'danger','content'=> sprintf( __( 'You can not access this page directly. Follow the password reset link you received in your email. To request new password reset link <a href="%s">visit here</a>.', 'userswp' ), esc_url( uwp_get_forgot_page_url() ) ) )); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 40 |
} ?> |
| 41 |
|
| 42 |
<div class="uwp-footer-links"> |
| 43 |
<div class="uwp-footer-link float-left"> |
| 44 |
<?php |
| 45 |
echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 46 |
'type' => 'a', |
| 47 |
'href' => esc_url( uwp_get_login_page_url() ), |
| 48 |
'class' => 'd-block text-center mt-2 small', |
| 49 |
'content' => uwp_get_option("login_link_title") ? esc_html( uwp_get_option("login_link_title") ) : esc_html__( 'Login', 'userswp' ), |
| 50 |
'extra_attributes' => array('rel'=>'nofollow') |
| 51 |
)); |
| 52 |
?> |
| 53 |
</div> |
| 54 |
<div class="uwp-footer-link float-right"> |
| 55 |
<?php |
| 56 |
echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 57 |
'type' => 'a', |
| 58 |
'href' => esc_url( uwp_get_register_page_url() ), |
| 59 |
'class' => 'd-block text-center mt-2 small', |
| 60 |
'content' => uwp_get_option("register_link_title") ? esc_html( uwp_get_option("register_link_title") ) : esc_html__( 'Create account', 'userswp' ), |
| 61 |
'extra_attributes' => array('rel'=>'nofollow') |
| 62 |
)); |
| 63 |
?> |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
|
| 67 |
</div> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
<?php do_action( 'uwp_template_after', 'reset' ); ?> |