auditionadmin/resources/views/admin/entries/create.blade.php

45 lines
2.2 KiB
PHP

<x-layout.app>
<x-card.card class="mx-auto max-w-2xl">
<x-card.heading>Create Entry</x-card.heading>
<x-form.form id='createEntryForm' method="POST" action="/admin/entries">
<x-form.body-grid columns="3" x-data="studentAuditionFilter()">
<x-form.select name="student_id" colspan="2" x-model="selectedStudentId" @change="filterAuditions">
<x-slot:label>Student</x-slot:label>
<option value="" disabled selected>Select a student</option>
<template x-for="student in students" :key="student.id">
<option :value="student.id" x-text="`${student.name} - ${student.school} - Grade ${student.grade}`"></option>
</template>
</x-form.select>
<x-form.select name="audition_id" colspan="1">
<x-slot:label>Audition</x-slot:label>
<option value="" disabled selected>Select an audition</option>
<template x-for="audition in filteredAuditions" :key="audition.id">
<option :value="audition.id" x-text="audition.name"></option>
</template>
</x-form.select>
@if(auditionSetting('advanceTo'))
<div class="col-span-3 align-top">
<x-form.checkbox name="for_seating"
label="Enter for {{ auditionSetting('auditionAbbreviation') }}"
checked />
</div>
<div class="col-span-3 align-top">
<x-form.checkbox name="for_advancement"
label="Enter for {{ auditionSetting('advanceTo') }}"
checked />
</div>
@else
<input type="hidden" name="for_seating" value="on">
@endif
</x-form.body-grid>
<x-form.footer class="mb-5">
<x-form.button>Create Entry</x-form.button>
</x-form.footer>
</x-form.form>
</x-card.card>
@include('students.student_audition_select_script')
</x-layout.app>