dashboard.php
6 years ago
downloads.php
6 years ago
form-add-payment-method.php
8 years ago
form-edit-account.php
7 years ago
form-edit-address.php
6 years ago
form-login.php
6 years ago
form-lost-password.php
7 years ago
form-reset-password.php
7 years ago
lost-password-confirmation.php
6 years ago
my-account.php
7 years ago
my-address.php
6 years ago
my-downloads.php
6 years ago
my-orders.php
6 years ago
navigation.php
7 years ago
orders.php
6 years ago
payment-methods.php
6 years ago
view-order.php
6 years ago
form-login.php
120 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Login Form |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/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 3.6.0 |
| 16 | */ |
| 17 | |
| 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | exit; // Exit if accessed directly. |
| 20 | } |
| 21 | |
| 22 | do_action( 'woocommerce_before_customer_login_form' ); ?> |
| 23 | |
| 24 | <?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?> |
| 25 | |
| 26 | <div class="u-columns col2-set" id="customer_login"> |
| 27 | |
| 28 | <div class="u-column1 col-1"> |
| 29 | |
| 30 | <?php endif; ?> |
| 31 | |
| 32 | <h2><?php esc_html_e( 'Login', 'woocommerce' ); ?></h2> |
| 33 | |
| 34 | <form class="woocommerce-form woocommerce-form-login login" method="post"> |
| 35 | |
| 36 | <?php do_action( 'woocommerce_login_form_start' ); ?> |
| 37 | |
| 38 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 39 | <label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label> |
| 40 | <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?> |
| 41 | </p> |
| 42 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 43 | <label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label> |
| 44 | <input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" /> |
| 45 | </p> |
| 46 | |
| 47 | <?php do_action( 'woocommerce_login_form' ); ?> |
| 48 | |
| 49 | <p class="form-row"> |
| 50 | <label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme"> |
| 51 | <input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span> |
| 52 | </label> |
| 53 | <?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?> |
| 54 | <button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button> |
| 55 | </p> |
| 56 | <p class="woocommerce-LostPassword lost_password"> |
| 57 | <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a> |
| 58 | </p> |
| 59 | |
| 60 | <?php do_action( 'woocommerce_login_form_end' ); ?> |
| 61 | |
| 62 | </form> |
| 63 | |
| 64 | <?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?> |
| 65 | |
| 66 | </div> |
| 67 | |
| 68 | <div class="u-column2 col-2"> |
| 69 | |
| 70 | <h2><?php esc_html_e( 'Register', 'woocommerce' ); ?></h2> |
| 71 | |
| 72 | <form method="post" class="woocommerce-form woocommerce-form-register register" <?php do_action( 'woocommerce_register_form_tag' ); ?> > |
| 73 | |
| 74 | <?php do_action( 'woocommerce_register_form_start' ); ?> |
| 75 | |
| 76 | <?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?> |
| 77 | |
| 78 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 79 | <label for="reg_username"><?php esc_html_e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label> |
| 80 | <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?> |
| 81 | </p> |
| 82 | |
| 83 | <?php endif; ?> |
| 84 | |
| 85 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 86 | <label for="reg_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label> |
| 87 | <input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" autocomplete="email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?> |
| 88 | </p> |
| 89 | |
| 90 | <?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?> |
| 91 | |
| 92 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 93 | <label for="reg_password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label> |
| 94 | <input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" autocomplete="new-password" /> |
| 95 | </p> |
| 96 | |
| 97 | <?php else : ?> |
| 98 | |
| 99 | <p><?php esc_html_e( 'A password will be sent to your email address.', 'woocommerce' ); ?></p> |
| 100 | |
| 101 | <?php endif; ?> |
| 102 | |
| 103 | <?php do_action( 'woocommerce_register_form' ); ?> |
| 104 | |
| 105 | <p class="woocommerce-FormRow form-row"> |
| 106 | <?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?> |
| 107 | <button type="submit" class="woocommerce-Button woocommerce-button button woocommerce-form-register__submit" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>"><?php esc_html_e( 'Register', 'woocommerce' ); ?></button> |
| 108 | </p> |
| 109 | |
| 110 | <?php do_action( 'woocommerce_register_form_end' ); ?> |
| 111 | |
| 112 | </form> |
| 113 | |
| 114 | </div> |
| 115 | |
| 116 | </div> |
| 117 | <?php endif; ?> |
| 118 | |
| 119 | <?php do_action( 'woocommerce_after_customer_login_form' ); ?> |
| 120 |