Files
Woles-Framework/app/Modules/User/view/create.php

119 lines
5.2 KiB
PHP
Raw Permalink Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ $title }}</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
'sans': ['Inter', 'system-ui', 'sans-serif'],
}
}
}
}
</script>
</head>
<body class="font-sans bg-gray-50 min-h-screen">
<!-- Header -->
<header class="bg-white shadow-sm border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16">
<div class="flex items-center">
<div class="text-2xl mr-3"></div>
<h1 class="text-xl font-bold text-gray-900">Woles Framework</h1>
</div>
<nav class="flex space-x-4">
<a href="/dashboard" class="text-gray-600 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium transition-colors">Dashboard</a>
<a href="/users" class="text-blue-600 hover:text-blue-700 px-3 py-2 rounded-md text-sm font-medium transition-colors">Users</a>
<a href="/logout" class="text-red-600 hover:text-red-700 px-3 py-2 rounded-md text-sm font-medium transition-colors">Logout</a>
</nav>
</div>
</div>
</header>
<!-- Main Content -->
<main class="max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<!-- Page Header -->
<div class="mb-8">
<h2 class="text-3xl font-bold text-gray-900 mb-2">Create New User</h2>
<p class="text-gray-600">Add a new user to the system</p>
</div>
<!-- Form Card -->
<div class="bg-white shadow-sm rounded-xl border border-gray-200 p-8">
<form method="POST" action="/users" class="space-y-6">
@csrf
<div>
<label for="name" class="block text-sm font-medium text-gray-700 mb-2">
Full Name
</label>
<input
type="text"
id="name"
name="name"
value="{{ old('name', $old['name'] ?? '') }}"
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors"
placeholder="Enter full name"
required>
@if (isset($errors['name']))
<p class="mt-2 text-sm text-red-600">{{ $errors['name'] }}</p>
@endif
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700 mb-2">
Email Address
</label>
<input
type="email"
id="email"
name="email"
value="{{ old('email', $old['email'] ?? '') }}"
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors"
placeholder="Enter email address"
required>
@if (isset($errors['email']))
<p class="mt-2 text-sm text-red-600">{{ $errors['email'] }}</p>
@endif
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-2">
Password
</label>
<input
type="password"
id="password"
name="password"
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors"
placeholder="Enter password"
required>
@if (isset($errors['password']))
<p class="mt-2 text-sm text-red-600">{{ $errors['password'] }}</p>
@endif
</div>
<div class="flex space-x-4 pt-4">
<button
type="submit"
class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
Create User
</button>
<a href="/users" class="bg-gray-600 hover:bg-gray-700 text-white px-6 py-3 rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2">
Cancel
</a>
</div>
</form>
</div>
</main>
</body>
</html>