change form

This commit is contained in:
Constantin Simonis 2025-01-28 12:59:49 +01:00
parent 6267393e8c
commit cfdc5b5227
Signed by: csimonis
GPG Key ID: 758DD9C506603183
3 changed files with 19 additions and 4 deletions

View File

@ -8,6 +8,8 @@ class TicketData
public string $notes = '',
public int $ticket = 0,
public int $afterShowTicket = 0,
public int $kids6yo = 0,
public int $kids12yo = 0,
) {
}
}

View File

@ -16,6 +16,8 @@ class TicketForm extends AbstractType
$builder
->add('ticket', NumberType::class)
->add('afterShowTicket', NumberType::class)
->add('kids6yo', NumberType::class)
->add('kids12yo', NumberType::class)
->add('notes', TextareaType::class);
}
}

View File

@ -25,14 +25,25 @@
{{ form_start(form, { 'attr': { 'class': 'space-y-6' } }) }}
<div class="grid grid-cols-1 sm:grid-cols-2 gap-6">
<div>
<label for="firstname" class="block text-sm font-medium text-gray-700 mb-1">Vorname *</label>
<input type="text" name="{{ field_name(form.ticket) }}" id="firstname" required
<label for="ticket" class="block text-sm font-medium text-gray-700 mb-1">Normales Tickets</label>
<input type="number" name="{{ field_name(form.ticket) }}" id="ticket" required value="0"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-orange-500 transition-colors">
</div>
<div>
<label for="lastname" class="block text-sm font-medium text-gray-700 mb-1">Nachname *</label>
<input type="text" name="{{ field_name(form.afterShowTicket) }}" id="lastname" required
<label for="afterShowTicket" class="block text-sm font-medium text-gray-700 mb-1">After-Show Tickets</label>
<input type="number" name="{{ field_name(form.afterShowTicket) }}" id="afterShowTicket" required value="0"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-orange-500 transition-colors">
</div>
<div>
<label for="12yo" class="block text-sm font-medium text-gray-700 mb-1">Kinder 0-6</label>
<input type="number" name="{{ field_name(form.kids12yo) }}" id="12yo" required value="0"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-orange-500 transition-colors">
</div>
<div>
<label for="6yo" class="block text-sm font-medium text-gray-700 mb-1">Kinder 6-12</label>
<input type="number" name="{{ field_name(form.kids6yo) }}" id="6yo" required value="0"
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-orange-500 transition-colors">
</div>
</div>