| 1 |
<?php |
| 2 |
/** |
| 3 |
* Login form |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/woocommerce/global/form-login.php. |
| 6 |
* |
| 7 |
* HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 |
* (the theme developer) will need to copy the new files to your theme to |
| 9 |
* maintain compatibility. We try to do this as little as possible, but it does |
| 10 |
* happen. When this occurs the version of the template file will be bumped and |
| 11 |
* the readme will list any important changes. |
| 12 |
* |
| 13 |
* @see https://docs.woocommerce.com/document/template-structure/ |
| 14 |
* @package WooCommerce\Templates |
| 15 |
* @version 7.0.1 |
| 16 |
* @var $controllers array Widgets/Addons Settings |
| 17 |
* @var $is_builder bool builder edit mode. |
| 18 |
* @var $hidden bool. |
| 19 |
* @var $message string. |
| 20 |
* @var $redirect string. |
| 21 |
*/ |
| 22 |
|
| 23 |
if ( ! defined( 'ABSPATH' ) ) { |
| 24 |
exit; // Exit if accessed directly. |
| 25 |
} |
| 26 |
|
| 27 |
use RadiusTheme\SB\Helpers\Fns; |
| 28 |
|
| 29 |
if ( ! $is_builder && ( is_user_logged_in() || 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ) ) { |
| 30 |
return; |
| 31 |
} |
| 32 |
|
| 33 |
$show_info_icon = ! empty( $controllers['show_info_icon'] ) ? $controllers['show_info_icon'] : ''; |
| 34 |
$the_icon = $show_info_icon && ! empty( $controllers['info_icon'] ) ? Fns::icons_manager( $controllers['info_icon'] ) : ''; |
| 35 |
|
| 36 |
?> |
| 37 |
|
| 38 |
<div class="rtsb-checkout-login-form <?php echo ! empty( $show_info_icon ) ? 'show-info-icon-yes': ''; ?>"> |
| 39 |
<div class="woocommerce-form-login-toggle rtsb-notice <?php echo ! empty( $the_icon ) ? 'print-custom-icon': ''; ?>"> |
| 40 |
<?php wc_print_notice( $the_icon . apply_filters( 'woocommerce_checkout_login_message', esc_html__( 'Returning customer?', 'shopbuilder' ) ) . ' <a href="#" class="showlogin">' . esc_html__( 'Click here to login', 'shopbuilder' ) . '</a>', 'notice' ); ?> |
| 41 |
</div> |
| 42 |
|
| 43 |
<div class="woocommerce-form woocommerce-form-login login" <?php echo esc_attr( $hidden ? 'style="display:none;"' : '' ); ?>> |
| 44 |
|
| 45 |
<?php do_action( 'woocommerce_login_form_start' ); ?> |
| 46 |
|
| 47 |
<?php if( ! empty( $controllers['show_description'] ) ) { ?> |
| 48 |
|
| 49 |
<?php if( ! empty( $controllers['description_text'] ) ) { ?> |
| 50 |
<p> <?php echo esc_html( $controllers['description_text'] ); ?> </p> |
| 51 |
<?php } else { ?> |
| 52 |
<?php Fns::print_html( $message ? wpautop( wptexturize( $message ) ) : '', true ); // @codingStandardsIgnoreLine ?> |
| 53 |
<?php } ?> |
| 54 |
|
| 55 |
<?php } ?> |
| 56 |
|
| 57 |
|
| 58 |
<div class="login-form-fields"> |
| 59 |
<div class="field-wrapper"> |
| 60 |
<label for="username"><?php esc_html_e( 'Username or email', 'shopbuilder' ); ?> <span class="required">*</span></label> |
| 61 |
<input type="text" class="input-text" name="username" id="username" autocomplete="username" /> |
| 62 |
</div> |
| 63 |
<div class="field-wrapper"> |
| 64 |
<label for="password"><?php esc_html_e( 'Password', 'shopbuilder' ); ?> <span class="required">*</span></label> |
| 65 |
<input class="input-text woocommerce-Input" type="password" name="password" id="password" autocomplete="current-password" /> |
| 66 |
</div> |
| 67 |
<?php do_action( 'woocommerce_login_form' ); ?> |
| 68 |
</div> |
| 69 |
|
| 70 |
<p class="form-row" > |
| 71 |
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme"> |
| 72 |
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'shopbuilder' ); ?></span> |
| 73 |
</label> |
| 74 |
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ); ?>" /> |
| 75 |
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="login" value="<?php esc_attr_e( 'Login', 'shopbuilder' ); ?>"><?php esc_html_e( 'Login', 'shopbuilder' ); ?></button> |
| 76 |
</p> |
| 77 |
<p class="lost_password"> |
| 78 |
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'shopbuilder' ); ?></a> |
| 79 |
</p> |
| 80 |
|
| 81 |
<div class="clear"></div> |
| 82 |
|
| 83 |
<?php do_action( 'woocommerce_login_form_end' ); ?> |
| 84 |
|
| 85 |
</div> |
| 86 |
</div> |
| 87 |
|