protected function configureFormFields(FormMapper $formMapper) { $subject = $this->getSubject(); // TODO Nexo: Wait for the new version of sonata-admin, where box_class is working $formMapper->with('', array('class' => 'col-md-8', 'box_class' => 'box box-solid box-danger', 'description' => 'Wichtig!!! Sonn- und allgemeine Feiertage werden momentan nicht berücksichtig. Nur die effektiven Arbeitstage als Ferientage verbuchen. Nötigenfalls zwei Eintrage machen.')); if (!$this->isChild()) { $formMapper->add('employee', 'sonata_type_model', array('btn_add' => false)); } $formMapper->add('startDate', 'date', array('label' => 'first_day', 'widget' => 'single_text'))->add('endDate', 'date', array('label' => 'last_day', 'widget' => 'single_text'))->add('startDateHalfDay', null, array('label' => 'only_half_day'))->add('endDateHalfDay', null, array('label' => 'only_half_day'))->add('state', 'choice', array('choices' => Vacation::getStateChoices(), 'placeholder' => 'choose_status', 'empty_data' => null))->add('comment', 'textarea', array('required' => false))->end(); }