Files
opentextsummaries/resources/views/categories/edit.blade.php
T

51 lines
2.5 KiB
PHP
Raw Normal View History

2025-09-13 17:39:17 +03:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit Category - Open Text Summaries</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-100">
<div class="container mx-auto px-4 py-8">
<div class="mb-6">
<h1 class="text-3xl font-bold text-indigo-700">Edit Category</h1>
</div>
<div class="bg-white shadow-md rounded-lg p-6">
<form action="{{ route('categories.update', $category) }}" method="POST">
@csrf
@method('PUT')
<div class="mb-4">
<label for="name" class="block text-gray-700 text-sm font-bold mb-2">Name:</label>
<input type="text" name="name" id="name" value="{{ old('name', $category->name) }}"
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('name') border-red-500 @enderror">
@error('name')
<p class="text-red-500 text-xs italic mt-1">{{ $message }}</p>
@enderror
</div>
<div class="mb-6">
<label for="description" class="block text-gray-700 text-sm font-bold mb-2">Description:</label>
<textarea name="description" id="description" rows="4"
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('description') border-red-500 @enderror">{{ old('description', $category->description) }}</textarea>
@error('description')
<p class="text-red-500 text-xs italic mt-1">{{ $message }}</p>
@enderror
</div>
<div class="flex items-center justify-between">
<button type="submit" class="bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
Update Category
</button>
<a href="{{ route('categories.index') }}" class="text-indigo-600 hover:text-indigo-800">
Cancel
</a>
</div>
</form>
</div>
</div>
</body>
</html>