Sam Jeston
History
44 lines·
2.2 KB
·HTML
| 1 | {% extends "layout_settings.html" %} |
| 2 | {% block title %}Profile settings · Openhub{% endblock %} |
| 3 | {% block settings %} |
| 4 | <section class="settings-section"> |
| 5 | <h2 class="settings-title">Public profile</h2> |
| 6 | {% if let Some(e) = error %}<div class="flash flash-error">{{ crate::web::fmt::icon("circle-alert")|safe }}<span>{{ e }}</span></div>{% endif %} |
| 7 | <form method="post" action="/settings/profile" class="form"> |
| 8 | <label class="field"> |
| 9 | <span class="field-label">Display name</span> |
| 10 | <input class="input" type="text" name="display_name" value="{{ display_name }}" maxlength="100"> |
| 11 | <span class="field-hint">Shown on your profile instead of your username.</span> |
| 12 | </label> |
| 13 | <label class="field"> |
| 14 | <span class="field-label">Email</span> |
| 15 | <input class="input" type="email" name="email" value="{{ email }}" required> |
| 16 | <span class="field-hint">Used as the author email for merges you perform on the web.</span> |
| 17 | </label> |
| 18 | <label class="field"> |
| 19 | <span class="field-label">Bio</span> |
| 20 | <textarea class="input" name="bio" rows="3" maxlength="500">{{ bio }}</textarea> |
| 21 | </label> |
| 22 | <div class="form-actions"><button class="btn btn-primary" type="submit">Update profile</button></div> |
| 23 | </form> |
| 24 | </section> |
| 25 | <section class="settings-section"> |
| 26 | <h2 class="settings-title">Change password</h2> |
| 27 | {% if let Some(e) = password_error %}<div class="flash flash-error">{{ crate::web::fmt::icon("circle-alert")|safe }}<span>{{ e }}</span></div>{% endif %} |
| 28 | <form method="post" action="/settings/password" class="form"> |
| 29 | <label class="field"> |
| 30 | <span class="field-label">Current password</span> |
| 31 | <input class="input" type="password" name="current" autocomplete="current-password" required> |
| 32 | </label> |
| 33 | <label class="field"> |
| 34 | <span class="field-label">New password</span> |
| 35 | <input class="input" type="password" name="new" autocomplete="new-password" minlength="8" required> |
| 36 | </label> |
| 37 | <label class="field"> |
| 38 | <span class="field-label">Confirm new password</span> |
| 39 | <input class="input" type="password" name="confirm" autocomplete="new-password" minlength="8" required> |
| 40 | </label> |
| 41 | <div class="form-actions"><button class="btn" type="submit">Change password</button></div> |
| 42 | </form> |
| 43 | </section> |
| 44 | {% endblock %} |