woocommerce/templates/auth/form-login.php

55 lines
2.3 KiB
PHP
Raw Normal View History

2015-04-22 15:27:12 +00:00
<?php
/**
2015-11-03 13:53:50 +00:00
* Auth form login
2015-04-22 15:27:12 +00:00
*
2015-11-03 13:31:20 +00:00
* This template can be overridden by copying it to yourtheme/woocommerce/auth/form-login.php.
*
2016-02-12 11:28:41 +00:00
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
2018-01-12 13:04:26 +00:00
* @see https://docs.woocommerce.com/document/template-structure/
2015-04-22 15:27:12 +00:00
* @package WooCommerce/Templates/Auth
2018-03-13 14:15:41 +00:00
* @version 3.4.0
2015-04-22 15:27:12 +00:00
*/
2018-03-13 14:15:41 +00:00
defined( 'ABSPATH' ) || exit;
2015-04-22 15:27:12 +00:00
2018-03-13 14:15:41 +00:00
do_action( 'woocommerce_auth_page_header' ); ?>
2015-04-22 15:27:12 +00:00
2018-01-12 13:04:26 +00:00
<h1>
<?php
/* translators: %s: app name */
printf( esc_html__( '%s would like to connect to your store', 'woocommerce' ), esc_html( $app_name ) );
?>
</h1>
2015-05-14 15:58:34 +00:00
<?php wc_print_notices(); ?>
2018-01-12 13:04:26 +00:00
<p>
<?php
/* translators: %1$s: app name, %2$s: URL */
echo wp_kses_post( sprintf( __( 'To connect to %1$s you need to be logged in. Log in to your store below, or <a href="%2$s">cancel and return to %1$s</a>', 'woocommerce' ), esc_html( wc_clean( $app_name ) ), esc_url( $return_url ) ) );
?>
</p>
2015-05-14 15:58:34 +00:00
<form method="post" class="wc-auth-login">
<p class="form-row form-row-wide">
2017-11-07 08:59:55 +00:00
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" /><?php //@codingStandardsIgnoreLine ?>
2015-05-14 15:58:34 +00:00
</p>
<p class="form-row form-row-wide">
2017-11-07 08:59:55 +00:00
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
2015-05-14 15:58:34 +00:00
<input class="input-text" type="password" name="password" id="password" />
</p>
<p class="wc-auth-actions">
2018-03-13 14:15:41 +00:00
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
<button type="submit" class="button button-large button-primary wc-auth-login-button" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>"><?php esc_html_e( 'Login', 'woocommerce' ); ?></button>
2015-04-22 20:21:42 +00:00
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect_url ); ?>" />
2015-05-14 15:58:34 +00:00
</p>
</form>
2015-04-22 20:02:15 +00:00
2015-04-22 15:27:12 +00:00
<?php do_action( 'woocommerce_auth_page_footer' ); ?>