| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template for displaying log in form. |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/learnpress/checkout/form-login.php. |
| 6 |
* |
| 7 |
* @author ThimPress |
| 8 |
* @package Learnpress/Templates |
| 9 |
* @version 4.0.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
defined( 'ABSPATH' ) || exit(); |
| 13 |
|
| 14 |
if ( is_user_logged_in() ) { |
| 15 |
return; |
| 16 |
} |
| 17 |
?> |
| 18 |
|
| 19 |
<input type="radio" id="checkout-account-switch-to-login" checked="checked" name="checkout-account-switch-form" value="login"/> |
| 20 |
<div id="checkout-account-login" class="lp-checkout-block left"> |
| 21 |
|
| 22 |
<h4><?php esc_html_e( 'Sign in', 'learnpress' ); ?></h4> |
| 23 |
|
| 24 |
<ul class="lp-form-fields"> |
| 25 |
<li class="form-field"> |
| 26 |
<label for="username"><?php esc_html_e( 'Username or email', 'learnpress' ); ?> <span class="required">*</span></label> |
| 27 |
<input type="text" name="username" id="username" placeholder="<?php esc_attr_e( 'Email or username', 'learnpress' ); ?>" autocomplete="username" /> |
| 28 |
</li> |
| 29 |
<li class="form-field"> |
| 30 |
<label for="password"><?php esc_html_e( 'Password', 'learnpress' ); ?> <span class="required">*</span></label> |
| 31 |
<input type="password" name="password" id="password" placeholder="<?php esc_attr_e( 'Password', 'learnpress' ); ?>" autocomplete="current-password" /> |
| 32 |
</li> |
| 33 |
</ul> |
| 34 |
|
| 35 |
<?php do_action( 'learn-press/after-checkout-account-login-fields' ); ?> |
| 36 |
|
| 37 |
<input type="hidden" name="learn-press-checkout-nonce" value="<?php echo wp_create_nonce( 'learn-press-checkout-login' ); ?>"> |
| 38 |
<p class="lp-checkout-remember"> |
| 39 |
<label> |
| 40 |
<input type="checkbox" name="rememberme"/> |
| 41 |
<?php esc_html_e( 'Remember me', 'learnpress' ); ?> |
| 42 |
</label> |
| 43 |
|
| 44 |
<a class="lp-lost-password-link" href="<?php echo esc_url_raw( wp_lostpassword_url() ); ?>"> |
| 45 |
<?php esc_html_e( 'Lost password?', 'learnpress' ); ?> |
| 46 |
</a> |
| 47 |
</p> |
| 48 |
|
| 49 |
<p class="lp-checkout-sign-up-link"> |
| 50 |
<?php if ( LP()->checkout()->is_enable_register() ) : ?> |
| 51 |
<?php esc_html_e( 'Don\'t have an account?', 'learnpress' ); ?> |
| 52 |
<a href="javascript: void(0);"> |
| 53 |
<label for="checkout-account-switch-to-register"><?php echo esc_html_x( 'Sign up', 'checkout sign up link', 'learnpress' ); ?></label> |
| 54 |
</a>. |
| 55 |
<?php endif; ?> |
| 56 |
|
| 57 |
<?php learn_press_get_template( 'checkout/guest-checkout-link' ); ?> |
| 58 |
</p> |
| 59 |
</div> |
| 60 |
|