Initial commit
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
@{
|
||||
ViewData["Title"] = "Set Your Password";
|
||||
Layout = "/Views/Shared/_AuthLayout.cshtml";
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<style>
|
||||
body { background: #f1f5f9; }
|
||||
|
||||
.pw-card {
|
||||
max-width: 480px;
|
||||
margin: 4rem auto;
|
||||
background: white;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 1rem;
|
||||
padding: 2.5rem;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.07);
|
||||
}
|
||||
|
||||
.pw-card .logo-row {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.pw-card .logo-row img {
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.pw-card h2 {
|
||||
font-size: 1.35rem;
|
||||
font-weight: 700;
|
||||
color: #1e293b;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.pw-card .subtitle {
|
||||
font-size: 0.9rem;
|
||||
color: #64748b;
|
||||
text-align: center;
|
||||
margin-bottom: 1.75rem;
|
||||
}
|
||||
|
||||
.password-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.password-wrapper .toggle-pw {
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: none;
|
||||
border: none;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.password-wrapper .toggle-pw:hover { color: #475569; }
|
||||
.password-wrapper input { padding-right: 2.75rem; }
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="pw-card">
|
||||
<div class="logo-row">
|
||||
<img src="/images/pcl-logo.png" alt="Powder Coating Logix" />
|
||||
</div>
|
||||
<h2>Set Your Password</h2>
|
||||
<p class="subtitle">
|
||||
Enter the temporary password from your welcome email, then choose a permanent one.
|
||||
</p>
|
||||
|
||||
@if (!ViewData.ModelState.IsValid && ViewData.ModelState.ErrorCount > 0)
|
||||
{
|
||||
<div class="alert alert-danger alert-permanent">
|
||||
<div asp-validation-summary="All" class="mb-0"></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<form method="post" id="changePwForm">
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="currentPassword" class="form-label fw-medium">
|
||||
Temporary Password <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="password-wrapper">
|
||||
<input type="password" id="currentPassword" name="currentPassword"
|
||||
class="form-control" autocomplete="current-password" required />
|
||||
<button type="button" class="toggle-pw" onclick="togglePw('currentPassword','cpIcon')" tabindex="-1">
|
||||
<i id="cpIcon" class="bi bi-eye"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="newPassword" class="form-label fw-medium">
|
||||
New Password <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="password-wrapper">
|
||||
<input type="password" id="newPassword" name="newPassword"
|
||||
class="form-control" autocomplete="new-password" required />
|
||||
<button type="button" class="toggle-pw" onclick="togglePw('newPassword','npIcon')" tabindex="-1">
|
||||
<i id="npIcon" class="bi bi-eye"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="confirmPassword" class="form-label fw-medium">
|
||||
Confirm New Password <span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="password-wrapper">
|
||||
<input type="password" id="confirmPassword" name="confirmPassword"
|
||||
class="form-control" autocomplete="new-password" required />
|
||||
<button type="button" class="toggle-pw" onclick="togglePw('confirmPassword','cpwIcon')" tabindex="-1">
|
||||
<i id="cpwIcon" class="bi bi-eye"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary w-100 py-2 fw-semibold" id="submitBtn">
|
||||
<i class="bi bi-check-circle me-2" id="submitIcon"></i>
|
||||
<span id="submitText">Set Password & Continue</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
<script>
|
||||
function togglePw(inputId, iconId) {
|
||||
var input = document.getElementById(inputId);
|
||||
var icon = document.getElementById(iconId);
|
||||
if (input.type === 'password') {
|
||||
input.type = 'text';
|
||||
icon.className = 'bi bi-eye-slash';
|
||||
} else {
|
||||
input.type = 'password';
|
||||
icon.className = 'bi bi-eye';
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('changePwForm').addEventListener('submit', function () {
|
||||
var btn = document.getElementById('submitBtn');
|
||||
var icon = document.getElementById('submitIcon');
|
||||
var text = document.getElementById('submitText');
|
||||
btn.disabled = true;
|
||||
icon.className = 'spinner-border spinner-border-sm me-2';
|
||||
text.textContent = 'Saving\u2026';
|
||||
});
|
||||
</script>
|
||||
}
|
||||
Reference in New Issue
Block a user