You've already forked wc-bootstrap
70 lines
2.2 KiB
Twig
70 lines
2.2 KiB
Twig
|
|
{#
|
||
|
|
# REST API Auth Login Form (Bootstrap 5 Override)
|
||
|
|
#
|
||
|
|
# Login form for third-party app OAuth authentication.
|
||
|
|
# Rendered outside the WordPress theme (standalone page).
|
||
|
|
#
|
||
|
|
# Expected context:
|
||
|
|
# app_name - Name of the requesting application
|
||
|
|
# return_url - URL to return to on cancel
|
||
|
|
# redirect_url - URL to redirect to after login
|
||
|
|
#
|
||
|
|
# WooCommerce PHP equivalent: auth/form-login.php
|
||
|
|
#
|
||
|
|
# @package WcBootstrap
|
||
|
|
# @since 0.1.0
|
||
|
|
#}
|
||
|
|
|
||
|
|
{{ do_action('woocommerce_auth_page_header') }}
|
||
|
|
|
||
|
|
<h1 class="h3 mb-4">
|
||
|
|
{{ __('%s would like to connect to your store')|format(app_name|esc_html) }}
|
||
|
|
</h1>
|
||
|
|
|
||
|
|
{{ wc_print_notices() }}
|
||
|
|
|
||
|
|
<p class="mb-4">
|
||
|
|
{{ __('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>')|format(app_name|esc_html, return_url|esc_url)|wp_kses_post }}
|
||
|
|
</p>
|
||
|
|
|
||
|
|
<form method="post" class="wc-auth-login">
|
||
|
|
<div class="mb-3">
|
||
|
|
<label for="username" class="form-label">
|
||
|
|
{{ __('Username or email address') }} <span class="text-danger" aria-hidden="true">*</span>
|
||
|
|
<span class="visually-hidden">{{ __('Required') }}</span>
|
||
|
|
</label>
|
||
|
|
<input type="text"
|
||
|
|
class="form-control"
|
||
|
|
name="username"
|
||
|
|
id="username"
|
||
|
|
required
|
||
|
|
aria-required="true" />
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="mb-3">
|
||
|
|
<label for="password" class="form-label">
|
||
|
|
{{ __('Password') }} <span class="text-danger" aria-hidden="true">*</span>
|
||
|
|
<span class="visually-hidden">{{ __('Required') }}</span>
|
||
|
|
</label>
|
||
|
|
<input type="password"
|
||
|
|
class="form-control"
|
||
|
|
name="password"
|
||
|
|
id="password"
|
||
|
|
required
|
||
|
|
aria-required="true" />
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="mt-3">
|
||
|
|
{{ wp_nonce_field('woocommerce-login', 'woocommerce-login-nonce') }}
|
||
|
|
<button type="submit"
|
||
|
|
class="btn btn-primary btn-lg"
|
||
|
|
name="login"
|
||
|
|
value="{{ __('Login') }}">
|
||
|
|
{{ __('Login') }}
|
||
|
|
</button>
|
||
|
|
<input type="hidden" name="redirect" value="{{ redirect_url|esc_url }}" />
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
|
||
|
|
{{ do_action('woocommerce_auth_page_footer') }}
|