First Commit
This commit is contained in:
+80
@@ -0,0 +1,80 @@
|
||||
@extends("layouts.app")
|
||||
|
||||
@section("title", __("Edit Custom Subject"))
|
||||
|
||||
@section("header")
|
||||
<div class="flex justify-between items-center">
|
||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
||||
{{ __("Edit Custom Subject") }}
|
||||
</h2>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<div class="py-6">
|
||||
<div class="max-w-3xl mx-auto sm:px-6 lg:px-8">
|
||||
@if(session("success"))
|
||||
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded-lg mb-6">
|
||||
{{ session("success") }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session("error"))
|
||||
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded-lg mb-6">
|
||||
{{ session("error") }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
|
||||
<div class="mb-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900">{{ $customSubject->name }}</h3>
|
||||
<p class="text-sm text-gray-500">{{ __("Created") }}: {{ $customSubject->created_at->format("d/m/Y H:i") }}</p>
|
||||
</div>
|
||||
|
||||
<form action="{{ route("admin.custom-subjects.update", $customSubject) }}" method="POST">
|
||||
@csrf
|
||||
@method("PUT")
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 mb-2">{{ __("Subject Name") }} *</label>
|
||||
<input type="text"
|
||||
name="name"
|
||||
id="name"
|
||||
value="{{ old("name", $customSubject->name) }}"
|
||||
required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 @error("name") border-red-500 @enderror">
|
||||
@error("name")
|
||||
<p class="text-red-500 text-xs mt-1">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mb-6">
|
||||
<div class="flex items-center">
|
||||
<input type="checkbox"
|
||||
name="is_active"
|
||||
id="is_active"
|
||||
value="1"
|
||||
{{ old("is_active", $customSubject->is_active) ? "checked" : "" }}
|
||||
class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
|
||||
<label for="is_active" class="ml-2 block text-sm text-gray-900">
|
||||
{{ __("Active") }}
|
||||
</label>
|
||||
</div>
|
||||
<p class="text-xs text-gray-500 mt-1">{{ __("Inactive subjects will not receive scheduled insights.") }}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<button type="submit"
|
||||
class="px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700 transition">
|
||||
{{ __("Save Changes") }}
|
||||
</button>
|
||||
<a href="{{ route("admin.custom-subjects.index") }}"
|
||||
class="px-4 py-2 bg-gray-200 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-300 transition">
|
||||
{{ __("Cancel") }}
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user