Skip to main content

max / makenotwork

2.1 KB · 50 lines History Blame Raw
1 {% include "wizards/partials/step_nav.html" %}
2
3 <div class="wizard-step">
4 <h2 class="subtitle-h2">Create account</h2>
5 <p class="step-description">Choose a username, enter your email, and set a password.</p>
6
7 <form hx-post="/join/step/account"
8 hx-target="#wizard-step" hx-swap="innerHTML">
9 <div class="form-group">
10 <label for="wiz-username">Username</label>
11 <input type="text" id="wiz-username" name="username" required
12 placeholder="username" autocomplete="off"
13 hx-post="/api/validate/username"
14 hx-trigger="keyup changed delay:500ms"
15 hx-target="#username-status"
16 hx-indicator="#username-spinner">
17 <div class="hint">Your public url: makenot.work/u/<span id="username-preview">username</span></div>
18 <span id="username-spinner" class="htmx-indicator username-spinner">Checking...</span>
19 <span id="username-status"></span>
20 </div>
21
22 <div class="form-group">
23 <label for="wiz-email">Email</label>
24 <input type="email" id="wiz-email" name="email" required
25 placeholder="you@example.com" autocomplete="email">
26 <div class="hint">Used for account recovery and notifications</div>
27 </div>
28
29 <div class="form-group">
30 <label for="wiz-password">Password</label>
31 <input type="password" id="wiz-password" name="password" required
32 placeholder="--------" minlength="8" autocomplete="new-password">
33 <div class="hint">Minimum 8 characters</div>
34 </div>
35
36 {% if let Some(code) = invite_code %}
37 <input type="hidden" name="invite_code" value="{{ code }}">
38 {% endif %}
39
40 <div class="wizard-actions">
41 <a href="/" class="btn-secondary">Cancel</a>
42 <button type="submit" class="btn-primary">Create Account</button>
43 </div>
44 </form>
45
46 <div class="foot-link foot-link--centered">
47 Already have an account? <a href="/login">Log in</a>
48 </div>
49 </div>
50