| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template for displaying register form. |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/learnpress/checkout/form-register.php. |
| 6 |
* |
| 7 |
* @author ThimPress |
| 8 |
* @package Learnpress/Templates |
| 9 |
* @version 4.0.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
defined( 'ABSPATH' ) || exit(); |
| 13 |
?> |
| 14 |
|
| 15 |
<input type="radio" id="checkout-account-switch-to-register" name="checkout-account-switch-form" value="register"/> |
| 16 |
<div id="checkout-account-register" class="lp-checkout-block left"> |
| 17 |
|
| 18 |
<h4><?php esc_html_e( 'Sign up', 'learnpress' ); ?></h4> |
| 19 |
|
| 20 |
<ul class="lp-form-fields"> |
| 21 |
<?php do_action( 'learn-press/before-form-register-fields' ); ?> |
| 22 |
|
| 23 |
<li class="form-field"> |
| 24 |
<label for="reg_email"><?php esc_html_e( 'Email address', 'learnpress' ); ?> <span class="required">*</span></label> |
| 25 |
<input id ="reg_email" name="reg_email" type="text" placeholder="<?php esc_attr_e( 'Email', 'learnpress' ); ?>" autocomplete="email" value="<?php echo esc_attr( LP_Helper::sanitize_params_submitted( $_POST['reg_email'] ?? '' ) ); ?>"> |
| 26 |
</li> |
| 27 |
<li class="form-field"> |
| 28 |
<label for="reg_username"><?php esc_html_e( 'Username', 'learnpress' ); ?> <span class="required">*</span></label> |
| 29 |
<input id ="reg_username" name="reg_username" type="text" placeholder="<?php esc_attr_e( 'Username', 'learnpress' ); ?>" autocomplete="username" value="<?php echo esc_attr( LP_Helper::sanitize_params_submitted( $_POST['reg_username'] ?? '' ) ); ?>"> |
| 30 |
</li> |
| 31 |
<li class="form-field"> |
| 32 |
<label for="reg_password"><?php esc_html_e( 'Password', 'learnpress' ); ?> <span class="required">*</span></label> |
| 33 |
<input id ="reg_password" name="reg_password" type="password" placeholder="<?php esc_attr_e( 'Password', 'learnpress' ); ?>" autocomplete="new-password"> |
| 34 |
</li> |
| 35 |
<li class="form-field"> |
| 36 |
<label for="reg_password2"><?php esc_html_e( 'Confirm Password', 'learnpress' ); ?> <span class="required">*</span></label> |
| 37 |
<input id ="reg_password2" name="reg_password2" type="password" placeholder="<?php esc_attr_e( 'Password', 'learnpress' ); ?>" autocomplete="off"> |
| 38 |
</li> |
| 39 |
|
| 40 |
<?php do_action( 'learn-press/after-form-register-fields' ); ?> |
| 41 |
</ul> |
| 42 |
|
| 43 |
<?php |
| 44 |
// Add hook of WordPress |
| 45 |
do_action( 'register_form' ); |
| 46 |
do_action( 'login_enqueue_scripts' ); |
| 47 |
?> |
| 48 |
|
| 49 |
<?php //wp_nonce_field( 'learn-press-checkout-register', 'learn-press-checkout-nonce' ); ?> |
| 50 |
|
| 51 |
<p class="lp-checkout-sign-in-link"> |
| 52 |
<?php if ( LearnPress::instance()->checkout()->is_enable_login() ) : ?> |
| 53 |
<?php esc_html_e( 'Already had an account?', 'learnpress' ); ?> |
| 54 |
<a href="javascript: void(0);"> |
| 55 |
<label for="checkout-account-switch-to-login"><?php esc_html_e( 'Sign in', 'learnpress' ); ?></label> |
| 56 |
</a>. |
| 57 |
<?php endif; ?> |
| 58 |
|
| 59 |
<?php learn_press_get_template( 'checkout/guest-checkout-link' ); ?> |
| 60 |
</p> |
| 61 |
|
| 62 |
<?php do_action( 'learn-press/after-checkout-form-register' ); ?> |
| 63 |
</div> |
| 64 |
|