protected function getPresentationFields()
 {
     $private_groups = $this->presentation_manager->getPrivateCategoryGroupsFor(Member::currentUser(), $this->summit);
     if ($this->summit->isCallForSpeakersOpen()) {
         $public_groups = $this->summit->CategoryGroups()->filter('ClassName', 'PresentationCategoryGroup')->toArray();
         $category_groups = array_merge($public_groups, $private_groups);
     } else {
         $category_groups = $private_groups;
     }
     $category_groups_map = array();
     foreach ($category_groups as $group) {
         $group_type = $group->ClassName == 'PrivatePresentationCategoryGroup' ? 'private' : 'public';
         $category_groups_map[] = array('id' => $group->ID, 'title' => $group->Name, 'group_type' => $group_type);
     }
     usort($category_groups_map, function ($a, $b) {
         return strcmp($a["title"], $b["title"]);
     });
     $fields = FieldList::create()->text('Title', 'Proposed Presentation Title')->configure()->setAttribute('autofocus', 'TRUE')->end()->dropdown('TypeID', 'Select the format (Presentation: Max 3 speakers; Panel: Max 4 speakers, 1 moderator)')->configure()->setEmptyString('-- Select one --')->setSource(PresentationType::get()->filter('SummitID', $this->summit->ID)->exclude('Type', 'Keynotes')->map('ID', 'Type'))->end()->literal('CategoryContainer', '<div id="category_options"></div>')->dropdown('Level', 'Select the technical level of your presentation content')->configure()->setEmptyString('-- Select one --')->setSource(Presentation::create()->dbObject('Level')->enumValues())->end()->literal('AbstractHelp', '<hr/><p>YouTube and other services limit the length of your presentation\'s description. We will take the first 100 characters of your abstract to display in the YouTube description.</p>')->tinyMCEEditor('ShortDescription', 'Abstract (1000 chars)')->configure()->setRows(20)->setColumns(8)->end()->tinyMCEEditor('ProblemAddressed', 'What is the problem or use case you’re addressing in this session? (1000 chars)')->configure()->setRows(20)->setColumns(8)->end()->tinyMCEEditor('AttendeesExpectedLearnt', 'What should attendees expect to learn? (1000 chars)')->configure()->setRows(20)->setColumns(8)->end()->literal('PresentationMaterialsTitle', '<h3>Please provide any relevant links to additional information, such as code repositories, case studies, papers, blog posts etc. (Up to 5 links)</h3>')->text('PresentationLink[1]', '#1')->text('PresentationLink[2]', '#2')->text('PresentationLink[3]', '#3')->text('PresentationLink[4]', '#4')->text('PresentationLink[5]', '#5')->hidden('ID', 'ID')->hidden('SummitID', '', $this->summit->ID)->hidden('CategoryIDbis', '');
     $CategoryGroupField = new CategoryGroupField('GroupID', 'Select the <a href="' . $this->summit->Link . 'categories" target="_blank">Summit Category</a> of your presentation');
     $CategoryGroupField->setSource($category_groups_map);
     $fields->insertAfter($CategoryGroupField, 'TypeID');
     return $fields;
 }
Esempio n. 2
0
 /**
  *
  */
 public function assignEventType($type = "Presentation")
 {
     $summit_id = intval($this->SummitID);
     if ($summit_id > 0 && intval($this->TypeID) === 0) {
         Summit::seedBasicEventTypes($summit_id);
         $event_type = PresentationType::get()->filter(array('Type' => $type, 'SummitID' => $summit_id))->first();
         $this->TypeID = $event_type->ID;
     }
 }