203 lines
5.2 KiB
PHP
203 lines
5.2 KiB
PHP
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>{{ $title }}</title>
|
||
|
|
<style>
|
||
|
|
* {
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
body {
|
||
|
|
font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||
|
|
background: #f8f9fa;
|
||
|
|
color: #333;
|
||
|
|
}
|
||
|
|
|
||
|
|
.header {
|
||
|
|
background: white;
|
||
|
|
padding: 1rem 2rem;
|
||
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
align-items: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.header h1 {
|
||
|
|
color: #667eea;
|
||
|
|
font-size: 1.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-links {
|
||
|
|
display: flex;
|
||
|
|
gap: 1rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-links a {
|
||
|
|
color: #667eea;
|
||
|
|
text-decoration: none;
|
||
|
|
padding: 0.5rem 1rem;
|
||
|
|
border-radius: 5px;
|
||
|
|
transition: background-color 0.3s ease;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-links a:hover {
|
||
|
|
background: #f0f0f0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.container {
|
||
|
|
max-width: 800px;
|
||
|
|
margin: 2rem auto;
|
||
|
|
padding: 0 2rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.page-header {
|
||
|
|
margin-bottom: 2rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.page-header h2 {
|
||
|
|
color: #333;
|
||
|
|
font-size: 1.8rem;
|
||
|
|
margin-bottom: 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.page-header p {
|
||
|
|
color: #666;
|
||
|
|
}
|
||
|
|
|
||
|
|
.card {
|
||
|
|
background: white;
|
||
|
|
padding: 2rem;
|
||
|
|
border-radius: 10px;
|
||
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||
|
|
}
|
||
|
|
|
||
|
|
.form-group {
|
||
|
|
margin-bottom: 1.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.form-group label {
|
||
|
|
display: block;
|
||
|
|
margin-bottom: 0.5rem;
|
||
|
|
color: #333;
|
||
|
|
font-weight: 500;
|
||
|
|
}
|
||
|
|
|
||
|
|
.form-group input {
|
||
|
|
width: 100%;
|
||
|
|
padding: 0.75rem;
|
||
|
|
border: 2px solid #e1e5e9;
|
||
|
|
border-radius: 5px;
|
||
|
|
font-size: 1rem;
|
||
|
|
transition: border-color 0.3s ease;
|
||
|
|
}
|
||
|
|
|
||
|
|
.form-group input:focus {
|
||
|
|
outline: none;
|
||
|
|
border-color: #667eea;
|
||
|
|
}
|
||
|
|
|
||
|
|
.field-error {
|
||
|
|
color: #dc3545;
|
||
|
|
font-size: 0.85rem;
|
||
|
|
margin-top: 0.25rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn {
|
||
|
|
background: #667eea;
|
||
|
|
color: white;
|
||
|
|
padding: 0.75rem 1.5rem;
|
||
|
|
border: none;
|
||
|
|
border-radius: 5px;
|
||
|
|
text-decoration: none;
|
||
|
|
font-weight: 500;
|
||
|
|
transition: background-color 0.3s ease;
|
||
|
|
display: inline-block;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn:hover {
|
||
|
|
background: #5a6fd8;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-secondary {
|
||
|
|
background: #6c757d;
|
||
|
|
margin-left: 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-secondary:hover {
|
||
|
|
background: #5a6268;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
|
||
|
|
<body>
|
||
|
|
<div class="header">
|
||
|
|
<h1>NovaCore Framework</h1>
|
||
|
|
<div class="nav-links">
|
||
|
|
<a href="/dashboard">Dashboard</a>
|
||
|
|
<a href="/users">Users</a>
|
||
|
|
<a href="/logout">Logout</a>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="container">
|
||
|
|
<div class="page-header">
|
||
|
|
<h2>Edit User</h2>
|
||
|
|
<p>Update user information</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="card">
|
||
|
|
<form method="POST" action="/users/{{ $user['id'] }}">
|
||
|
|
@csrf
|
||
|
|
@method('PUT')
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="name">Full Name</label>
|
||
|
|
<input
|
||
|
|
type="text"
|
||
|
|
id="name"
|
||
|
|
name="name"
|
||
|
|
value="{{ $user['name'] }}"
|
||
|
|
required>
|
||
|
|
@if (isset($errors['name']))
|
||
|
|
<div class="field-error">{{ $errors['name'] }}</div>
|
||
|
|
@endif
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="email">Email Address</label>
|
||
|
|
<input
|
||
|
|
type="email"
|
||
|
|
id="email"
|
||
|
|
name="email"
|
||
|
|
value="{{ $user['email'] }}"
|
||
|
|
required>
|
||
|
|
@if (isset($errors['email']))
|
||
|
|
<div class="field-error">{{ $errors['email'] }}</div>
|
||
|
|
@endif
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label for="password">New Password (leave blank to keep current)</label>
|
||
|
|
<input
|
||
|
|
type="password"
|
||
|
|
id="password"
|
||
|
|
name="password">
|
||
|
|
@if (isset($errors['password']))
|
||
|
|
<div class="field-error">{{ $errors['password'] }}</div>
|
||
|
|
@endif
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<button type="submit" class="btn">Update User</button>
|
||
|
|
<a href="/users/{{ $user['id'] }}" class="btn btn-secondary">Cancel</a>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
|
||
|
|
</html>
|