36 lines
1.5 KiB
PHP
36 lines
1.5 KiB
PHP
<x-layout.app>
|
|
<x-card.card class="mx-auto max-w-2xl">
|
|
<x-card.heading>Edit Entry #{{ $entry->id }}</x-card.heading>
|
|
<x-form.form method="PATCH" action="/admin/entries/{{ $entry->id }}">
|
|
<x-form.body-grid columns="3">
|
|
|
|
<x-form.select name="student_id" colspan="2">
|
|
<x-slot:label>Student</x-slot:label>
|
|
@foreach ($students as $student)
|
|
|
|
<option value="{{ $student->id }}" {{ ($student->id == $entry->student_id ? 'selected':'') }}>
|
|
{{ $student->full_name(true) }} - {{ $student->school->name }} (Grade {{ $student->grade }})
|
|
</option>
|
|
|
|
@endforeach
|
|
|
|
</x-form.select><x-form.select name="audition_id" colspan="1">
|
|
<x-slot:label>Audition</x-slot:label>
|
|
@foreach ($auditions as $audition)
|
|
|
|
<option value="{{ $audition->id }}" {{ ($audition->id == $entry->audition_id ? 'selected':'') }}>
|
|
{{ $audition->name }}
|
|
</option>
|
|
|
|
@endforeach
|
|
</x-form.select>
|
|
</x-form.body-grid>
|
|
<x-form.footer class="!py-5">
|
|
<x-form.button>Edit Entry</x-form.button>
|
|
</x-form.footer>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
</x-layout.app>
|
|
|
|
{{--TODO apply javascript to only show appropriate auditions for the students grade--}}
|