File size: 2,497 Bytes
c710bef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | <div class="max-w-3xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
<div class="bg-white shadow rounded-lg p-6">
<h2 class="text-2xl font-semibold text-gray-800 mb-6">Create New Lesson</h2>
<form wire:submit.prevent="save">
<!-- Title Field -->
<div class="mb-6">
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">Lesson Title</label>
<input wire:model="title" type="text" id="title" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
@error('title') <span class="text-sm text-red-600">{{ $message }}</span> @enderror
</div>
<!-- Video URL Field -->
<div class="mb-6">
<label for="video" class="block text-sm font-medium text-gray-700 mb-1">Video URL</label>
<input wire:model="video" type="url" id="video" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="https://example.com/video.mp4">
@error('video') <span class="text-sm text-red-600">{{ $message }}</span> @enderror
</div>
<!-- Body/Content Field -->
<div class="mb-6">
<label for="body" class="block text-sm font-medium text-gray-700 mb-1">Lesson Content</label>
<textarea wire:model="body" id="body" rows="8" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></textarea>
@error('body') <span class="text-sm text-red-600">{{ $message }}</span> @enderror
</div>
<!-- Form Actions -->
<div class="flex justify-end space-x-3">
<button type="button" class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
Cancel
</button>
<button type="submit" class="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
Save Lesson
</button>
</div>
</form>
</div>
</div> |