62 lines
3.0 KiB
PHP
62 lines
3.0 KiB
PHP
<!--suppress JSUnresolvedReference -->
|
|
<x-layout.app>
|
|
<x-card.card class="mx-auto max-w-2xl">
|
|
<x-card.heading>Create Entry</x-card.heading>
|
|
@if ($errors->any())
|
|
<div class="mt-3">
|
|
@foreach($errors->all() as $error)
|
|
<div class="ml-3">
|
|
<span
|
|
class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 inset-ring inset-ring-red-600/10 dark:bg-red-400/10 dark:text-red-400 dark:inset-ring-red-400/20">{{$error}}</span>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
<x-form.form id='createEntryForm' method="POST" action="/admin/entries" class="mt-3">
|
|
<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
|
|
<div class="col-span-3 align-top">
|
|
<x-form.checkbox name="late_fee_waived"
|
|
label="Wave late fee if applicable"/>
|
|
</div>
|
|
</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>
|