password change feature
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><%= typeof title !== 'undefined' ? title + ' | Loot Hunt' : 'Loot Hunt' %></title>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<script>
|
||||
// Apply theme before render to prevent flash
|
||||
|
||||
@@ -86,6 +86,28 @@
|
||||
<div style="text-align: center; margin-top: 1rem;">
|
||||
<a href="/leaderboard" class="btn btn-outline">Global Leaderboard</a>
|
||||
</div>
|
||||
|
||||
<% if (typeof isOwnProfile !== 'undefined' && isOwnProfile) { %>
|
||||
<div class="card" style="margin-top: 1.5rem;">
|
||||
<div class="card-header">🔒 Change Password</div>
|
||||
<form method="POST" action="/player/<%= profile.username %>/password">
|
||||
<div class="form-group">
|
||||
<label for="current_password">Current Password</label>
|
||||
<input type="password" id="current_password" name="current_password" class="form-control" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="new_password">New Password</label>
|
||||
<input type="password" id="new_password" name="new_password" class="form-control" required minlength="6">
|
||||
<div class="form-hint">At least 6 characters.</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="new_password_confirm">Confirm New Password</label>
|
||||
<input type="password" id="new_password_confirm" name="new_password_confirm" class="form-control" required minlength="6">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Change Password</button>
|
||||
</form>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<%- include('../partials/footer') %>
|
||||
|
||||
Reference in New Issue
Block a user