<commit_before><?php

namespace TicketBundle\Form\Admin\Event;

/**
 * Add Event
 *
 * @author <NAME> <<EMAIL>>
 */
class Add extends \CommonBundle\Component\Form\Admin\Form
{
    protected $hydrator = 'TicketBundle\Hydrator\Event';

    public function init()
    {
        parent::init();

        $this->setAttribute('class', $this->getAttribute('class') . ' half_width');

        $this->add(
            array(
                'type'       => 'select',
                'name'       => 'event',
                'label'      => 'Event',
                'required'   => true,
                'attributes' => array(
                    'options' => $this->createEventsArray(),
                ),
                'options'    => array(
                    'input' => array(
                        'filter' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array('name' => 'Activity'),
                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'select',
                'name'     => 'form',
                'label'    => 'Form',
                'required' => false,
                'attributes' => array(
                    'options' => $this->createFormArray(),
                ),
                'options'    => array(
                    'input' => array(
                        'filter' => array(
                            array('name' => 'StringTrim'),
                        ),
            //                        'validators' => array(
            //                            array('name' => 'Activity'),
            //                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'active',
                'label'    => 'Active',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'bookable',
                'label'    => 'Bookable',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'bookable_praesidium',
                'label'    => 'Bookable For Praesidium',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'       => 'text',
                'name'       => 'mail_from',
                'label'      => 'Email',
                'required'   => false,
                'attributes' => array(
                    'id' => 'mail_from',
                ),
                'options'    => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array('name' => 'EmailAddress'),
                        ),
                    ),
                ),
            ),
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'deadline_enabled',
                'label'    => 'Payable after 24 hours',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'       => 'text',
                'name'       => 'deadline_time',
                'label'      => 'Minutes that the link is valid',
                'required'   => false,
                'options'    => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array('name' => 'Int'),
                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'datetime',
                'name'     => 'bookings_close_date',
                'label'    => 'Bookings Close Date',
                'required' => false,
                'options'  => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array(
                                'name'    => 'Date',
                                'options' => array(
                                    'format' => 'd/m/Y H:i',
                                ),
                            ),
                            array(
                                'name'    => 'DateCompare',
                                'options' => array(
                                    'first_date' => 'now',
                                    'format'     => 'd/m/Y H:i',
                                ),
                            ),
                            array(
                                'name'    => 'BookingCloseData',
                                'options' => array(
                                    'format' => 'd/m/Y H:i',
                                ),
                            ),
                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'qr_enabled',
                'label'    => 'Enable qr code for tickets',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'generate_tickets',
                'label'    => 'Generate Tickets (needed to print out ticket)',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'     => 'text',
                'name'     => 'number_of_tickets',
                'label'    => 'Number Of Tickets (0: No Limit)',
                'value'    => 0,
                'required' => true,
                'options'  => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),<commit_msg>removed something to get tickets working<commit_after><?php

namespace TicketBundle\Form\Admin\Event;

/**
 * Add Event
 *
 * @author <NAME> <<EMAIL>>
 */
class Add extends \CommonBundle\Component\Form\Admin\Form
{
    protected $hydrator = 'TicketBundle\Hydrator\Event';

    public function init()
    {
        parent::init();

        $this->setAttribute('class', $this->getAttribute('class') . ' half_width');

        $this->add(
            array(
                'type'       => 'select',
                'name'       => 'event',
                'label'      => 'Event',
                'required'   => true,
                'attributes' => array(
                    'options' => $this->createEventsArray(),
                ),
                'options'    => array(
                    'input' => array(
                        'filter' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array('name' => 'Activity'),
                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'select',
                'name'     => 'form',
                'label'    => 'Form',
                'required' => false,
                'attributes' => array(
                    'options' => $this->createFormArray(),
                ),
                'options'    => array(
                    'input' => array(
                        'filter' => array(
                            array('name' => 'StringTrim'),
                        ),
            //                        'validators' => array(
            //                            array('name' => 'Activity'),
            //                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'active',
                'label'    => 'Active',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'bookable',
                'label'    => 'Bookable',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'bookable_praesidium',
                'label'    => 'Bookable For Praesidium',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'       => 'text',
                'name'       => 'mail_from',
                'label'      => 'Email',
                'required'   => false,
                'attributes' => array(
                    'id' => 'mail_from',
                ),
                'options'    => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array('name' => 'EmailAddress'),
                        ),
                    ),
                ),
            ),
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'deadline_enabled',
                'label'    => 'Payable after 24 hours',
                'required' => false,
            )
        );

        $this->add(
            array(
                'type'       => 'text',
                'name'       => 'deadline_time',
                'label'      => 'Minutes that the link is valid',
                'required'   => false,
                'options'    => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array('name' => 'Int'),
                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'datetime',
                'name'     => 'bookings_close_date',
                'label'    => 'Bookings Close Date',
                'required' => false,
                'options'  => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),
                        ),
                        'validators' => array(
                            array(
                                'name'    => 'Date',
                                'options' => array(
                                    'format' => 'd/m/Y H:i',
                                ),
                            ),
                            array(
                                'name'    => 'DateCompare',
                                'options' => array(
                                    'first_date' => 'now',
                                    'format'     => 'd/m/Y H:i',
                                ),
                            ),
                            array(
                                'name'    => 'BookingCloseData',
                                'options' => array(
                                    'format' => 'd/m/Y H:i',
                                ),
                            ),
                        ),
                    ),
                ),
            )
        );

        $this->add(
            array(
                'type'     => 'checkbox',
                'name'     => 'qr_enabled',
                'label'    => 'Enable qr code for tickets',
                'required' => false,
            )
        );

//        $this->add(
//            array(
//                'type'     => 'checkbox',
//                'name'     => 'generate_tickets',
//                'label'    => 'Generate Tickets (needed to print out ticket)',
//                'required' => false,
//            )
//        );

        $this->add(
            array(
                'type'     => 'text',
                'name'     => 'number_of_tickets',
                'label'    => 'Number Of Tickets (0: No Limit)',
                'value'    => 0,
                'required' => true,
                'options'  => array(
                    'input' => array(
                        'filters' => array(
                            array('name' => 'StringTrim'),
{'fraction_non_alphanumeric': 0.1323852031167259, 'fraction_numerical': 0.0006051894999621756, 'mean_word_length': 0.6797966963151207, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 237, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3007684', 'n_tokens_mistral': 3234, 'n_tokens_neox': 2951, 'n_words': 554}