File size: 6,410 Bytes
187ef74 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | {% extends "auth_base.html" %}
{% block auth_content %}
<section class="auth-panel" data-auth-flow="{{ flow }}">
{% if flow == "register" %}
<h1 class="auth-heading">Welcome!<br><span data-auth-register-step-title>What's your email?</span></h1>
<p class="visually-hidden">{{ introduction }}</p>
{% else %}
<h1 class="auth-heading">{{ heading }}</h1>
<p>{{ introduction }}</p>
{% endif %}
{% if auth_error %}
<div class="state-panel state-error" role="alert"><p>{{ auth_error }}</p></div>
{% endif %}
{% if auth_notice %}
<div class="state-panel" role="status"><p>{{ auth_notice }}</p></div>
{% endif %}
{% if flow == "register" %}
<form method="post" action="/auth/register" class="auth-form" data-auth-register-two-step{% if public_registration_enabled %} data-external-registration="true"{% endif %}>
<input type="hidden" name="csrf" value="{{ csrf }}">
<div class="eds-field" data-auth-register-step="email">
<div class="eds-field__box">
<span class="eds-field__label">Email</span>
<input id="register-email" name="email" type="email" autocomplete="email" required aria-label="Email"{% if public_registration_enabled %} data-auth-email{% endif %}>
</div>
</div>
<div data-auth-register-details>
<label for="register-name">Name</label>
<input id="register-name" name="display_name" autocomplete="name" required>
{% if public_registration_enabled %}
<button type="button" data-auth-send-code>Send verification code</button>
<section data-auth-code-panel hidden aria-label="Verify email address">
<label for="public-registration-code">Verification code</label>
<input id="public-registration-code" data-auth-code inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]{6}" maxlength="6">
<button type="button" data-auth-verify-code>Verify code</button>
</section>
<p data-auth-verification-status role="status" aria-live="polite"></p>
{% endif %}
<label for="register-password">Password</label>
<input id="register-password" name="password" type="password" autocomplete="new-password" minlength="8" required>
</div>
<button type="button" class="eds-btn eds-btn--fill eds-btn--block eds-btn--lg" data-auth-register-continue>Continue</button>
<button type="submit" class="eds-btn eds-btn--fill eds-btn--block eds-btn--lg" data-auth-register-submit{% if public_registration_enabled %} disabled data-auth-create-account{% endif %}>Create account</button>
</form>
{% if public_registration_enabled %}<script src="/static/auth-verification.js"></script>{% endif %}
<div class="auth-divider" role="separator"><span>Or sign in with</span></div>
<p class="auth-legal">By clicking Continue or the Apple, Google, or Facebook icons,
you agree to Eventbrite's <a href="/terms">Terms of Service</a> and
<a href="/privacy">Privacy Policy</a>.</p>
<div class="auth-social" aria-label="Social sign-in">
<button type="button" class="auth-social__btn" data-auth-social aria-label="Sign in with Apple">
<svg class="icon" aria-hidden="true"><use href="#i-apple"/></svg></button>
<button type="button" class="auth-social__btn" data-auth-social aria-label="Sign in with Google">
<svg class="icon" aria-hidden="true"><use href="#i-google"/></svg></button>
<button type="button" class="auth-social__btn" data-auth-social aria-label="Sign in with Facebook">
<svg class="icon" aria-hidden="true"><use href="#i-facebook"/></svg></button>
</div>
<p class="auth-social-note" data-auth-social-note hidden>Social sign-in isn't available in this environment — use your email above.</p>
{% elif flow == "register-verify" %}
{% if local_mail %}
<div class="state-panel" role="status">
<p>Use this one-time verification code to finish creating your account:</p>
<p class="verification-status"><strong>{{ local_mail.status }}</strong></p>
</div>
{% endif %}
<form method="post" action="/auth/register/verify" class="auth-form">
<input type="hidden" name="csrf" value="{{ csrf }}">
<label for="register-code">Verification code</label>
<input id="register-code" name="code" inputmode="numeric" pattern="[0-9]{6}" required>
<button type="submit" class="cta">Verify account</button>
</form>
{% elif flow == "forgot" %}
<form method="post" action="/auth/password/forgot" class="auth-form">
<input type="hidden" name="csrf" value="{{ csrf }}">
<label for="forgot-email">Email address</label>
<input id="forgot-email" name="email" type="email" autocomplete="email" required>
<button type="submit" class="cta">Continue</button>
</form>
{% elif flow == "password-verify" %}
{% if local_mail %}
<div class="state-panel" role="status">
<p>No external email was sent. Use this one-time verification code:</p>
<p class="verification-status"><strong>{{ local_mail.status }}</strong></p>
</div>
{% endif %}
<form method="post" action="/auth/password/verify" class="auth-form">
<input type="hidden" name="csrf" value="{{ csrf }}">
<label for="reset-code">Verification code</label>
<input id="reset-code" name="code" inputmode="numeric" pattern="[0-9]{6}" required>
<button type="submit" class="cta">Verify code</button>
</form>
{% elif flow == "password-reset" %}
<form method="post" action="/auth/password/reset" class="auth-form">
<input type="hidden" name="csrf" value="{{ csrf }}">
<label for="new-password">New password</label>
<input id="new-password" name="new_password" type="password" autocomplete="new-password" minlength="8" required>
<button type="submit" class="cta">Update password</button>
</form>
{% elif flow == "inbox" %}
{% if messages %}
{% for message in messages %}
<article class="state-panel">
<h2>{{ message.template|replace("-", " ")|title }}</h2>
<p>Status: {{ message.status|replace("_", " ")|title }}</p>
<p>Delivery status: <strong>{{ message.status }}</strong></p>
</article>
{% endfor %}
{% else %}
<div class="state-panel"><p>There are no account messages for this session.</p></div>
{% endif %}
{% endif %}
{% if flow == "register" %}
<nav class="auth-links"><a href="/orders">Need help finding your tickets?</a></nav>
{% else %}
<p><a href="/auth/login">Return to sign in</a></p>
{% endif %}
</section>
{% endblock %}
|