protected function setUp() { $realization_time = new Text('realization_time'); $realization_time->setLabel(Translate::translate('Realization time')); $this->addControl($realization_time); $partners = new Wpeditor('partners'); $partners->setLabel(Translate::translate('Partners')); $this->addControl($partners); $contact = new Textarea('contact'); $contact->setLabel(Translate::translate('Contact')); $this->addControl($contact); $external_url = new Text('external_url'); $external_url->setLabel(Translate::translate('External URL')); $external_url->setValidation('url'); $this->addControl($external_url); $group = new Group('persons'); $group->setLabel(Translate::translate('Persons engage in project')); $group->setSortable(true); $group->setRepeating(true); $label = new Text('label'); $label->setLabel(Translate::translate('Label')); $group->addControl($label); $name = new Text('person'); $name->setLabel(Translate::translate('Person')); $group->addControl($name); $this->addControl($group); $attachments = new Attachments('attachments'); $this->addControl($attachments); }
protected function setUp() { $attachments = new Attachments('attachments'); $this->addControl($attachments); $checkbox = new Checkbox('main_page_promo'); $checkbox->setLabel(Translate::translate('Promotion on main page')); $this->addControl($checkbox); $place = new Text('place'); $place->setLabel(Translate::translate('Place')); $this->addControl($place); $address = new Text('address'); $address->setLabel(Translate::translate('Event address')); $this->addControl($address); $program = new Group('program'); $program->setLabel(Translate::translate('Program')); $program->setRepeating(true); $program->setSortable(true); $label = new Text('title'); $label->setLabel(Translate::translate('Title')); $program->addControl($label); $description = new Wpeditor('description'); $description->setLabel(Translate::translate('Description')); $program->addControl($description); $this->addControl($program); $start = new Group('start'); $start->setLabel(Translate::translate('Start')); $date = new Date('date_start'); $date->setLabel(Translate::translate('Date start')); $start->addControl($date); $time = new Text('time_start'); $time->setLabel(Translate::translate('Time start')); $start->addControl($time); $this->addControl($start); $end = new Group('end'); $end->setLabel(Translate::translate('End')); $date = new Date('date_end'); $date->setLabel(Translate::translate('Date end')); $end->addControl($date); $time = new Text('time_end'); $time->setLabel(Translate::translate('Time end')); $end->addControl($time); $this->addControl($end); }