some progress

This commit is contained in:
2025-09-20 16:47:41 +03:00
parent e650f3c1b2
commit 2228469bcb
65 changed files with 3382 additions and 311 deletions
+39 -48
View File
@@ -1,50 +1,41 @@
<!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>
@extends('layouts.app')
<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>
@section('content')
<div class="mb-6">
<h1 class="text-3xl font-bold text-indigo-700">Edit Category</h1>
</div>
</body>
</html>
<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>
@endsection