protected function getPresentationFields() { $categorySource = Summit::ActiveSummit()->Categories()->map('ID', 'FormattedTitleAndDescription')->toArray(); $categorySource['other'] = '<h4 class="category-label">Other topic...</h4>'; $fields = FieldList::create()->text('Title', 'Proposed Presentation Title')->configure()->setAttribute('autofocus', 'TRUE')->end()->dropdown('Level', 'Please select the 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)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('ProblemAddressed', 'What is the problem or use case you’re addressing in this session? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('AttendeesExpectedLearnt', 'What should attendees expect to learn? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('SelectionMotive', 'Why should this session be selected? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->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')->literal('HR', '<hr/>')->optionset('CategoryID', 'What is the general topic of the presentation?')->configure()->setSource($categorySource)->end()->text('OtherTopic', 'Other topic (if one above does not match)')->configure()->displayIf('CategoryID')->isEqualTo('other')->end()->end()->hidden('ID', 'ID'); return $fields; }
/** * @return ISummitAttendee|null */ public function getUpcomingSummitAttendee() { $upcoming_summit = Summit::ActiveSummit(); if ($upcoming_summit) { return $this->getSummitAttendee($upcoming_summit->ID); } return null; }
public function ActiveSummit() { return Summit::ActiveSummit(); }
protected function getSpeakerFields() { $fields = FieldList::create()->text('FirstName', "Speaker's first name")->configure()->setAttribute('autofocus', 'TRUE')->end()->text('LastName', "Speaker's last name")->text('Title', "Speaker's title")->dropdown('Country', 'Country of Residence', CountryCodes::$iso_3166_countryCodes)->configure()->setEmptyString('-- Select One --')->end()->tinyMCEEditor('Bio', "Speaker's Bio")->configure()->setRows(25)->setRequired(true)->end()->text('IRCHandle', 'IRC Handle (optional)')->configure()->setMaxLength(25)->end()->text('TwitterHandle', 'Twitter Handle (optional)')->configure()->setMaxLength(50)->end()->fileAttachment('Photo', 'Upload a speaker photo')->configure()->setPermission('delete', false)->setAcceptedFiles(array('png', 'gif', '.jpeg', '.jpg'))->setView('grid')->setMaxFilesize(1)->end()->bootstrapIgnore('Photo')->literal('SpokenLanguagesTitle', '<h3>Spoken Languages ( Up to 5)</h3>')->text('Language[1]', '#1')->text('Language[2]', '#2')->text('Language[3]', '#3')->text('Language[4]', '#4')->text('Language[5]', '#5')->literal('ExpertiseTitle', '<h3>Areas of Expertise ( Up to 5)</h3>')->text('Expertise[1]', '#1')->text('Expertise[2]', '#2')->text('Expertise[3]', '#3')->text('Expertise[4]', '#4')->text('Expertise[5]', '#5')->literal('PresentationTitle', '<h3>Links To Previous Presentations ( Up to 5)</h3>')->text('PresentationLink[1]', 'Link #1')->text('PresentationTitle[1]', 'Title #1')->text('PresentationLink[2]', 'Link #2')->text('PresentationTitle[2]', 'Title #2')->text('PresentationLink[3]', 'Link #3')->text('PresentationTitle[3]', 'Title #3')->text('PresentationLink[4]', 'Link #4')->text('PresentationTitle[4]', 'Title #4')->text('PresentationLink[5]', 'Link #5')->text('PresentationTitle[5]', 'Title #5')->literal('RecordingAndPublishingLegalAgreement', sprintf('Speakers agree that OpenStack Foundation may record and publish their talks presented during the %s OpenStack Summit. If you submit a proposal on behalf of a speaker, you represent to OpenStack Foundation that you have the authority to submit the proposal on the speaker’s behalf and agree to the recording and publication of their presentation.', Summit::ActiveSummit()->Title))->header('Want to be in the Speakers\' Bureau?')->checkbox('AvailableForBureau', "I'd like to be in the speaker bureau")->configure()->addExtraClass('bureau-checkbox')->end()->checkbox('WillingToPresentVideo', "Willing to present via video conference")->configure()->addExtraClass('bureau-checkbox')->end()->checkbox('FundedTravel', 'My Company would be willing to fund my travel to events')->configure()->addExtraClass('bureau-checkbox')->end()->optionset('WillingToTravel', 'I am willing to travel to events:', array(1 => 'Yes', 0 => 'No'))->multidropdown('CountriesToTravel', 'Countries willing to travel to: ', CountryCodes::$iso_3166_countryCodes)->configure()->addExtraClass('countries-to-travel')->end()->tinyMCEEditor('Notes', "Notes")->configure()->setRows(10)->end(); return $fields; }
/** * @return SS_HTTPResponse */ public function addFeedback() { try { $data = $this->getJsonRequest(); $event_id = (int) $this->request->param('EventID'); $summit_id = (int) $this->request->param('SUMMIT_ID'); $member_id = Member::CurrentUserID(); if (!$data) { return $this->serverError(); } if (intval($summit_id) > 0) { $summit = $this->summit_repository->getById(intval($summit_id)); } if (strtolower($summit_id) === 'current') { $summit = Summit::ActiveSummit(); } if (is_null($summit)) { return $this->notFound('summit not found!'); } if (intval($event_id) > 0) { $event = $this->summitevent_repository->getById(intval($event_id)); } if (is_null($event)) { return $this->notFound('event not found!'); } else { if ($event->getSummit()->getIdentifier() != intval($summit_id)) { return $this->notFound('event not found in current summit'); } } $data['summit_id'] = $summit->ID; $data['event_id'] = $event_id; $data['member_id'] = $member_id; return $this->created($this->schedule_manager->addFeedback($data)); } catch (EntityValidationException $ex1) { SS_Log::log($ex1, SS_Log::WARN); return $this->validationError($ex1->getMessages()); } catch (NotFoundEntityException $ex2) { SS_Log::log($ex2, SS_Log::WARN); return $this->notFound($ex2->getMessage()); } catch (Exception $ex) { SS_Log::log($ex, SS_Log::ERR); return $this->serverError(); } }