public function initialize()
 {
     $this->addHidden("id");
     if ($this->isCreate()) {
         $this->addHidden("type");
         $this['type']->value = $this->getType();
         $this->addTextArea("content", "eventsModule.partForm.content", 40, 3);
     } else {
         $this->addMultiSelect("owners", "eventsModule.partForm.owners", $this->getUsers(), 20)->setRequired("eventsModule.partForm.ownersMustSel");
         $this->addSelect("type", "eventsModule.partForm.type", EventParticipationType::getOptions())->setRequired("eventsModule.partForm.typeMustSel");
         $this->addTextArea("content", "eventsModule.partForm.content", 40, 3);
     }
     $this->addSubmit("submitButton", "system.forms.submitButton.label")->getControlPrototype()->class = "btn btn-primary";
     $this->onSuccess[] = callback($this->parent, "participationFormSuccess");
 }
Example #2
0
 public function partyTypeRender($e)
 {
     return $this->tt(EventParticipationType::getOptions()[$e->getType()]);
 }