Exemplo n.º 1
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.Main', new HTMLEditorField('VisaInformation', 'Visa Information'));
     $fields->addFieldToTab('Root.Main', new HTMLEditorField('TravelSupport', 'Travel Support'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('CityIntro', 'City Intro'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('AboutTheCity', 'About The City'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('Locals', 'In The Words Of The Locals'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('GettingAround', 'Getting Around'));
     $fields->addFieldsToTab('Root.CityInfo', new TextField('HostCityLat', 'City Latitude (Map Center)'));
     $fields->addFieldsToTab('Root.CityInfo', new TextField('HostCityLng', 'City Longitude (Map Center)'));
     $fields->addFieldToTab('Root.MapLocations', new HTMLEditorField('LocationsTextHeader', 'Intro Text'));
     $fields->addFieldToTab('Root.MapLocations', new HTMLEditorField('OtherLocations', 'Other Locations'));
     if ($this->ID) {
         // Summit Question Categories
         $fields->addFieldsToTab('Root.Main', $venue_back = new UploadField('VenueBackgroundImage', 'Venue Background Image'));
         $venue_back->setFolderName('summits/locations');
         $venue_back->setAllowedMaxFileNumber(1);
         $venue_back->setAllowedFileCategories('image');
         $fields->addFieldsToTab('Root.Main', new TextField('VenueBackgroundImageHero', 'Venue Background Image Author'));
         $fields->addFieldsToTab('Root.Main', new TextField('VenueBackgroundImageHeroSource', 'Venue Background Image Author Url'));
         $fields->addFieldsToTab('Root.CityInfo', $about_back = new UploadField('AboutTheCityBackgroundImage', 'About The City Background Image'));
         $about_back->setFolderName('summits/location/about');
         $about_back->setAllowedMaxFileNumber(1);
         $about_back->setAllowedFileCategories('image');
         $fields->addFieldsToTab('Root.CityInfo', new TextField('AboutTheCityBackgroundImageHero', 'About The City Background Image Author'));
         $fields->addFieldsToTab('Root.CityInfo', new TextField('AboutTheCityBackgroundImageHeroSource', 'About The City Background Image Author Source Url'));
     }
     $fields->addFieldToTab('Root.Main', new TextField('VenueTitleText', 'Venue Title Text'));
     $fields->addFieldToTab('Root.Main', new TextField('AirportsTitle', 'Airports Title'));
     $fields->addFieldToTab('Root.Main', new TextField('AirportsSubTitle', 'Airports SubTitle'));
     $fields->addFieldToTab('Root.Main', new TextField('CampusGraphic', 'URL of image of campus graphic'));
     return $fields;
 }
Exemplo n.º 2
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab('Root.Main', new HtmlEditorField('PresentationDeadlineText', 'Presentation Deadline Text'));
     $fields->addFieldsToTab('Root.LegalAgreement', new HtmlEditorField('LegalAgreement', 'Legal Agreement'));
     return $fields;
 }
 public function getCMSFields()
 {
     $f = parent::getCMSFields();
     //current summit
     $f->removeByName('Content');
     $f->addFieldToTab('Root.CurrentSummit', new HtmlEditorField('ThankYouText', 'ThankYouText'));
     $f->addFieldToTab('Root.CurrentSummit', new TextField('CurrentSummitFlickrUrl', 'Flickr Url'));
     $image = new UploadField('CurrentSummitBackgroundImage', 'Background Image');
     $image->setAllowedMaxFileNumber(1);
     $image->setFolderName(sprintf('summits/%s/highlights/', $this->SummitID));
     $f->addFieldToTab('Root.CurrentSummit', $image);
     // statistics
     $f->addFieldToTab('Root.Statistics', new TextField('AttendanceQty', 'Attendance Qty'));
     $f->addFieldToTab('Root.Statistics', new TextField('CompaniesRepresentedQty', 'Companies Represented Qty'));
     $f->addFieldToTab('Root.Statistics', new TextField('CountriesRepresentedQty', 'Countries Represented Qty'));
     $f->addFieldToTab('Root.Statistics', new TextField('StatisticsVideoUrl', 'Video Url'));
     $file = new UploadField('StatisticsVideo', 'Video');
     $file->setAllowedMaxFileNumber(1);
     $file->setAllowedExtensions(array('mp4'));
     $file->setFolderName(sprintf('summits/%s/highlights/statistics', $this->SummitID));
     $f->addFieldToTab('Root.Statistics', $file);
     $image = new UploadField('StatisticsVideoPoster', 'Video Poster');
     $image->setAllowedMaxFileNumber(1);
     $image->setFolderName(sprintf('summits/%s/highlights/statistics', $this->SummitID));
     $f->addFieldToTab('Root.Statistics', $image);
     // next summit
     $f->addFieldToTab('Root.NextSummit', new HtmlEditorField('NextSummitText', 'Next Summit Text'));
     $dropdown = DropdownField::create('NextSummitBackgroundImageID', 'Please choose an image for this page', SummitImage::get()->map("ID", "Title", "Please Select"))->setEmptyString('(None)');
     $f->addFieldToTab('Root.NextSummit', $dropdown);
     $image = new UploadField('NextSummitTinyBackgroundImage', 'Promo Background Image');
     $image->setAllowedMaxFileNumber(1);
     $image->setFolderName(sprintf('summits/%s/highlights/next_summit/', $this->SummitID));
     $f->addFieldToTab('Root.NextSummit', $image);
     // release
     $f->addFieldToTab('Root.ReleaseAnnounced', new TextField('ReleaseAnnouncedTitle', 'Title'));
     $f->addFieldToTab('Root.ReleaseAnnounced', new HtmlEditorField('ReleaseAnnouncedDescription', 'Description'));
     $f->addFieldToTab('Root.ReleaseAnnounced', new TextField('ReleaseAnnouncedButtonTitle', 'Button Text'));
     $f->addFieldToTab('Root.ReleaseAnnounced', new TextField('ReleaseAnnouncedButtonLink', 'Button Link'));
     $release_image = new UploadField('ReleaseAnnouncedImage', 'Image');
     $release_image->setAllowedMaxFileNumber(1);
     $release_image->setFolderName(sprintf('summits/%s/highlights/release/', $this->SummitID));
     $f->addFieldToTab('Root.ReleaseAnnounced', $release_image);
     if ($this->ID > 0) {
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent($sort = new GridFieldSortableRows('Order'));
         $gridField = new GridField('KeynotesImages', 'KeynotesImages', $this->KeynotesImages(), $config);
         $f->addFieldToTab('Root.KeyNotesImages', $gridField);
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent($sort = new GridFieldSortableRows('Order'));
         $gridField = new GridField('Pics', 'Pics', $this->Pics(), $config);
         $f->addFieldToTab('Root.Pics', $gridField);
     }
     return $f;
 }
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     if ($this->ID) {
         // Summit Updates
         $updateFields = singleton('SummitUpdate')->getCMSFields();
         $config = GridFieldConfig_RelationEditor::create();
         $config->addComponent(new GridFieldSortableRows('Order'));
         $gridField = new GridField('Updates', 'Updates', $this->SummitUpdates(), $config);
         $fields->addFieldToTab('Root.Updates', $gridField);
         // Summit Important Dates
         $dateFields = singleton('SummitActivityDate')->getCMSFields();
         $config = GridFieldConfig_RelationEditor::create();
         $config->getComponentByType('GridFieldDetailForm')->setFields($dateFields);
         $gridField = new GridField('ImportantDates', 'Important Dates', $this->ImportantDates(), $config);
         $fields->addFieldToTab('Root.ImportantDates', $gridField);
     }
     return $fields;
 }
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     if ($this->ID) {
         // Summit Questions
         $questionFields = singleton('SummitQuestion')->getCMSFields();
         $config = GridFieldConfig_RelationEditor::create();
         $config->getComponentByType('GridFieldDetailForm')->setFields($questionFields);
         $config->addComponent(new GridFieldSortableRows('Order'));
         $gridField = new GridField('Questions', 'Questions', $this->Questions(), $config);
         $fields->addFieldToTab('Root.Questions', $gridField);
         // Summit Question Categories
         $categoryFields = singleton('SummitQuestionCategory')->getCMSFields();
         $config = GridFieldConfig_RelationEditor::create();
         $config->getComponentByType('GridFieldDetailForm')->setFields($categoryFields);
         $gridField = new GridField('Categories', 'Categories', $this->Categories(), $config);
         $fields->addFieldToTab('Root.QuestionCategories', $gridField);
     }
     return $fields;
 }
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.Main', new HTMLEditorField('VisaInformation', 'Visa Information'));
     $fields->addFieldToTab('Root.Main', new HTMLEditorField('TravelSupport', 'Travel Support'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('CityIntro', 'City Intro'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('AboutTheCity', 'About The City'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('Locals', 'In The Words Of The Locals'));
     $fields->addFieldToTab('Root.CityInfo', new HTMLEditorField('GettingAround', 'Getting Around'));
     $fields->addFieldsToTab('Root.CityInfo', new TextField('HostCityLat', 'City Latitude (Map Center)'));
     $fields->addFieldsToTab('Root.CityInfo', new TextField('HostCityLng', 'City Longitude (Map Center)'));
     $fields->addFieldToTab('Root.MapLocations', new HTMLEditorField('LocationsTextHeader', 'Intro Text'));
     $fields->addFieldToTab('Root.MapLocations', new HTMLEditorField('OtherLocations', 'Other Locations'));
     if ($this->ID) {
         // Summit Question Categories
         $LocationFields = singleton('SummitLocation')->getCMSFields();
         $config = GridFieldConfig_RelationEditor::create();
         $config->getComponentByType('GridFieldDetailForm')->setFields($LocationFields);
         $config->addComponent(new GridFieldSortableRows('Order'));
         $gridField = new GridField('Locations', 'Locations', $this->Locations(), $config);
         $fields->addFieldToTab('Root.MapLocations', $gridField);
         $fields->addFieldsToTab('Root.Main', $venue_back = new UploadField('VenueBackgroundImage', 'Venue Background Image'));
         $venue_back->setFolderName('summits/locations');
         $venue_back->setAllowedMaxFileNumber(1);
         $venue_back->setAllowedFileCategories('image');
         $fields->addFieldsToTab('Root.Main', new TextField('VenueBackgroundImageHero', 'Venue Background Image Author'));
         $fields->addFieldsToTab('Root.Main', new TextField('VenueBackgroundImageHeroSource', 'Venue Background Image Author Url'));
         $fields->addFieldsToTab('Root.CityInfo', $about_back = new UploadField('AboutTheCityBackgroundImage', 'About The City Background Image'));
         $about_back->setFolderName('summits/location/about');
         $about_back->setAllowedMaxFileNumber(1);
         $about_back->setAllowedFileCategories('image');
         $fields->addFieldsToTab('Root.CityInfo', new TextField('AboutTheCityBackgroundImageHero', 'About The City Background Image Author'));
         $fields->addFieldsToTab('Root.CityInfo', new TextField('AboutTheCityBackgroundImageHeroSource', 'About The City Background Image Author Source Url'));
     }
     $fields->addFieldToTab('Root.Main', new TextField('VenueTitleText', 'Venue Title Text'));
     $fields->addFieldToTab('Root.Main', new TextField('AirportsTitle', 'Airports Title'));
     $fields->addFieldToTab('Root.Main', new TextField('AirportsSubTitle', 'Airports SubTitle'));
     $fields->addFieldToTab('Root.Main', new TextField('CampusGraphic', 'URL of image of campus graphic'));
     return $fields;
 }
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab('Root.Main', new HtmlEditorField('OverviewIntro', 'Overview Intro'));
     if ($this->ID > 0) {
         $fields->addFieldToTab('Root.Networking', new HtmlEditorField('NetworkingContent', 'Content'));
         //networking photos
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent(new GridFieldSortableRows('Order'));
         $gridField = new GridField('NetworkingPhotos', 'Photos', $this->NetworkingPhotos(), $config);
         $fields->addFieldToTab('Root.Networking', $gridField);
         $fields->addFieldToTab('Root.Networking', new HtmlEditorField('NetworkingContent', 'Content'));
         //menu items
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent(new GridFieldSortableRows('Order'));
         $gridField = new GridField('HelpMenuItems', 'Help Menu Items', $this->HelpMenuItems(), $config);
         $fields->addFieldToTab('Root.HelpSideBarMenu', $gridField);
     }
     $fields->addFieldsToTab('Root.Schedule', new TextField('ScheduleTitle', 'Title'));
     $fields->addFieldsToTab('Root.Schedule', new HtmlEditorField('ScheduleText', 'Text'));
     $fields->addFieldsToTab('Root.Schedule', new TextField('ScheduleUrl', 'Url'));
     $fields->addFieldsToTab('Root.Schedule', new TextField('ScheduleBtnText', 'Button Caption'));
     // Video Recap
     $fields->addFieldsToTab('Root.VideoRecap', new TextField('RecapTitle', 'Title'));
     $fields->addFieldsToTab('Root.VideoRecap', new TextField('VideoRecapCaption1', 'Caption Text 1'));
     $fields->addFieldsToTab('Root.VideoRecap', new TextField('VideoRecapYouTubeID1', 'YouTubeID 1'));
     $fields->addFieldsToTab('Root.VideoRecap', new TextField('VideoRecapCaption2', 'Caption Text 2'));
     $fields->addFieldsToTab('Root.VideoRecap', new TextField('VideoRecapYouTubeID2', 'YouTubeID 2'));
     // GrowthBox
     $fields->addFieldToTab("Root.GrowthBox", new HtmlEditorField('GrowthBoxTextTop', 'Text Top'));
     $fields->addFieldToTab("Root.GrowthBox", new HtmlEditorField('GrowthBoxTextBottom', 'Text Bottom'));
     $fields->addFieldsToTab("Root.GrowthBox", $upload_0 = new UploadField('GrowthBoxBackground', 'Background Image'));
     $fields->addFieldsToTab("Root.GrowthBox", $upload_1 = new UploadField('GrowthBoxChartLegend', 'Chart Legend (SVG)'));
     $fields->addFieldsToTab("Root.GrowthBox", $upload_2 = new UploadField('GrowthBoxChartLegendPng', 'Chart Legend (PNG)'));
     $fields->addFieldsToTab("Root.GrowthBox", $upload_3 = new UploadField('GrowthBoxChart', 'Chart (SVG)'));
     $fields->addFieldsToTab("Root.GrowthBox", $upload_4 = new UploadField('GrowthBoxChartPng', 'Chart (PNG)'));
     $upload_0->setFolderName('summits/overview');
     $upload_0->setAllowedMaxFileNumber(1);
     $upload_0->setAllowedFileCategories('image');
     $upload_0->setOverwriteWarning(false);
     $upload_0->getUpload()->setReplaceFile(true);
     $upload_1->setFolderName('summits/overview');
     $upload_1->setAllowedMaxFileNumber(1);
     $upload_1->setAllowedExtensions(array('svg'));
     $upload_1->setOverwriteWarning(false);
     $upload_1->getUpload()->setReplaceFile(true);
     $upload_2->setFolderName('summits/overview');
     $upload_2->setAllowedMaxFileNumber(1);
     $upload_2->setAllowedExtensions(array('png'));
     $upload_2->setOverwriteWarning(false);
     $upload_2->getUpload()->setReplaceFile(true);
     $upload_3->setFolderName('summits/overview');
     $upload_3->setAllowedMaxFileNumber(1);
     $upload_3->setAllowedExtensions(array('svg'));
     $upload_3->setOverwriteWarning(false);
     $upload_3->getUpload()->setReplaceFile(true);
     $upload_4->setFolderName('summits/overview');
     $upload_4->setAllowedMaxFileNumber(1);
     $upload_4->setAllowedExtensions(array('png'));
     $upload_4->setOverwriteWarning(false);
     $upload_4->getUpload()->setReplaceFile(true);
     //two main events
     $fields->addFieldsToTab('Root.TwoMainEvents', new TextField('TwoMainEventsTitle', 'Title'));
     $fields->addFieldsToTab('Root.TwoMainEvents', new TextField('EventOneTitle', 'Event One - Title'));
     $fields->addFieldsToTab('Root.TwoMainEvents', new TextField('EventOneSubTitle', 'Event One - SubTitle'));
     $fields->addFieldsToTab('Root.TwoMainEvents', new HtmlEditorField('EventOneContent', 'Event One - Content'));
     $fields->addFieldsToTab('Root.TwoMainEvents', new TextField('EventTwoTitle', 'Event Two - Title'));
     $fields->addFieldsToTab('Root.TwoMainEvents', new TextField('EventTwoSubTitle', 'Event Two - SubTitle'));
     $fields->addFieldsToTab('Root.TwoMainEvents', new HtmlEditorField('EventTwoContent', 'Event Two - Content'));
     $fields->addFieldsToTab("Root.TwoMainEvents", $upload_5 = new UploadField('EventOneLogo', 'Event Two Logo (SVG)'));
     $fields->addFieldsToTab("Root.TwoMainEvents", $upload_6 = new UploadField('EventOneLogoPng', 'Event Two Logo (PNG)'));
     $fields->addFieldsToTab("Root.TwoMainEvents", $upload_7 = new UploadField('EventTwoLogo', 'Event Two Logo (SVG)'));
     $fields->addFieldsToTab("Root.TwoMainEvents", $upload_8 = new UploadField('EventTwoLogoPng', 'Event Two Logo (PNG)'));
     $upload_5->setFolderName('summits/overview/events');
     $upload_5->setAllowedMaxFileNumber(1);
     $upload_5->setAllowedExtensions(array('svg'));
     $upload_5->setOverwriteWarning(false);
     $upload_5->getUpload()->setReplaceFile(true);
     $upload_6->setFolderName('summits/overview/events');
     $upload_6->setAllowedMaxFileNumber(1);
     $upload_6->setAllowedExtensions(array('png'));
     $upload_6->setOverwriteWarning(false);
     $upload_6->getUpload()->setReplaceFile(true);
     $upload_7->setFolderName('summits/overview/events');
     $upload_7->setAllowedMaxFileNumber(1);
     $upload_7->setAllowedExtensions(array('svg'));
     $upload_7->setOverwriteWarning(false);
     $upload_7->getUpload()->setReplaceFile(true);
     $upload_8->setFolderName('summits/overview/events');
     $upload_8->setAllowedMaxFileNumber(1);
     $upload_8->setAllowedExtensions(array('png'));
     $upload_8->setOverwriteWarning(false);
     $upload_8->getUpload()->setReplaceFile(true);
     //atendees chart
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_13 = new UploadField('AtendeesChartRef', 'Atendees Chart Legend (SVG)'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_19 = new UploadField('AtendeesChartRefPng', 'Atendees Chart Legend (PNG)'));
     $fields->addFieldToTab("Root.AtendeesChart", new TextField('Atendees1Label', 'Atendees 1 Label'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_9 = new UploadField('Atendees1Chart', 'Atendees 1 Chart (SVG)'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_15 = new UploadField('Atendees1ChartPng', 'Atendees 1 Chart (PNG)'));
     $fields->addFieldToTab("Root.AtendeesChart", new TextField('Atendees2Label', 'Atendees 2 Label'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_10 = new UploadField('Atendees2Chart', 'Atendees 2 Chart (SVG)'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_16 = new UploadField('Atendees2ChartPng', 'Atendees 2 Chart (PNG)'));
     $fields->addFieldToTab("Root.AtendeesChart", new TextField('Atendees3Label', 'Atendees 3 Label'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_11 = new UploadField('Atendees3Chart', 'Atendees 3 Chart (SVG)'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_17 = new UploadField('Atendees3ChartPng', 'Atendees 3 Chart (PNG)'));
     $fields->addFieldToTab("Root.AtendeesChart", new TextField('Atendees4Label', 'Atendees 4 Label'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_12 = new UploadField('Atendees4Chart', 'Atendees 4 Chart (SVG)'));
     $fields->addFieldsToTab("Root.AtendeesChart", $upload_18 = new UploadField('Atendees4ChartPng', 'Atendees 4 Chart (PNG)'));
     $upload_9->setFolderName('summits/overview');
     $upload_9->setAllowedMaxFileNumber(1);
     $upload_9->setAllowedExtensions(array('svg'));
     $upload_9->setOverwriteWarning(false);
     $upload_9->getUpload()->setReplaceFile(true);
     $upload_10->setFolderName('summits/overview');
     $upload_10->setAllowedMaxFileNumber(1);
     $upload_10->setAllowedExtensions(array('svg'));
     $upload_10->setOverwriteWarning(false);
     $upload_10->getUpload()->setReplaceFile(true);
     $upload_11->setFolderName('summits/overview');
     $upload_11->setAllowedMaxFileNumber(1);
     $upload_11->setAllowedExtensions(array('svg'));
     $upload_11->setOverwriteWarning(false);
     $upload_11->getUpload()->setReplaceFile(true);
     $upload_12->setFolderName('summits/overview');
     $upload_12->setAllowedMaxFileNumber(1);
     $upload_12->setAllowedExtensions(array('svg'));
     $upload_12->setOverwriteWarning(false);
     $upload_12->getUpload()->setReplaceFile(true);
     $upload_13->setFolderName('summits/overview');
     $upload_13->setAllowedMaxFileNumber(1);
     $upload_13->setAllowedExtensions(array('svg'));
     $upload_13->setOverwriteWarning(false);
     $upload_13->getUpload()->setReplaceFile(true);
     $upload_15->setFolderName('summits/overview');
     $upload_15->setAllowedMaxFileNumber(1);
     $upload_15->setAllowedExtensions(array('png'));
     $upload_15->setOverwriteWarning(false);
     $upload_15->getUpload()->setReplaceFile(true);
     $upload_16->setFolderName('summits/overview');
     $upload_16->setAllowedMaxFileNumber(1);
     $upload_16->setAllowedExtensions(array('png'));
     $upload_16->setOverwriteWarning(false);
     $upload_16->getUpload()->setReplaceFile(true);
     $upload_17->setFolderName('summits/overview');
     $upload_17->setAllowedMaxFileNumber(1);
     $upload_17->setAllowedExtensions(array('png'));
     $upload_17->setOverwriteWarning(false);
     $upload_17->getUpload()->setReplaceFile(true);
     $upload_18->setFolderName('summits/overview');
     $upload_18->setAllowedMaxFileNumber(1);
     $upload_18->setAllowedExtensions(array('png'));
     $upload_18->setOverwriteWarning(false);
     $upload_18->getUpload()->setReplaceFile(true);
     $upload_19->setFolderName('summits/overview');
     $upload_19->setAllowedMaxFileNumber(1);
     $upload_19->setAllowedExtensions(array('png'));
     $upload_19->setOverwriteWarning(false);
     $upload_19->getUpload()->setReplaceFile(true);
     //summit timeline
     $fields->addFieldToTab("Root.Timeline", new TextField('TimelineCaption', 'Timeline Caption'));
     $fields->addFieldsToTab("Root.Timeline", $upload_14 = new UploadField('TimelineImage', 'Timeline (SVG)'));
     $fields->addFieldsToTab("Root.Timeline", $upload_20 = new UploadField('TimelineImagePng', 'Timeline (PNG)'));
     $upload_14->setFolderName('summits/overview');
     $upload_14->setAllowedMaxFileNumber(1);
     $upload_14->setAllowedExtensions(array('svg'));
     $upload_14->setOverwriteWarning(false);
     $upload_14->getUpload()->setReplaceFile(true);
     $upload_20->setFolderName('summits/overview');
     $upload_20->setAllowedMaxFileNumber(1);
     $upload_20->setAllowedExtensions(array('png'));
     $upload_20->setOverwriteWarning(false);
     $upload_20->getUpload()->setReplaceFile(true);
     return $fields;
 }
Exemplo n.º 8
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.Main', new TextField('SchedEmbedURL', 'Enter The Sched Embed URL'), 'Content');
     return $fields;
 }
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     // Optional Sponsor Alert
     $sponsorAlertField = new TextField('SponsorAlert', 'Sponsor Alert');
     $fields->addFieldToTab('Root.Main', $sponsorAlertField);
     $fields->addFieldsToTab('Root.Main', new HtmlEditorField('SponsorIntro', 'Sponsor Intro Text'));
     $fields->addFieldsToTab('Root.Main', new HtmlEditorField('HowToSponsorContent', 'How To Sponsor (Bottom)'));
     $fields->addFieldsToTab('Root.Main', new HtmlEditorField('VenueMapContent', 'Venue Map Content'));
     // Sponsor Steps Editor
     $sponsorStepsField = new HTMLEditorField('SponsorSteps', 'Steps To Become A Sponsor');
     $fields->addFieldToTab('Root.Main', $sponsorStepsField, 'Content');
     //call for sponsorship dates
     $start_date = new DatetimeField('CallForSponsorShipStartDate', 'Call For SponsorShip - Start Date');
     $end_date = new DatetimeField('CallForSponsorShipEndDate', 'Call For SponsorShip - End Date');
     $start_date->getDateField()->setConfig('showcalendar', true);
     $start_date->setConfig('dateformat', 'dd/MM/yyyy');
     $end_date->getDateField()->setConfig('showcalendar', true);
     $end_date->setConfig('dateformat', 'dd/MM/yyyy');
     $fields->addFieldToTab('Root.Main', $start_date);
     $fields->addFieldToTab('Root.Main', $end_date);
     if ($this->ID) {
         //set current page id
         $_REQUEST["PageId"] = $this->ID;
         // Summit Packages
         $config = GridFieldConfig_RelationEditor::create();
         $config->addComponent(new GridFieldSortableRows('Order'));
         $gridField = new GridField('SummitPackages', 'Sponsor Packages', $this->SummitPackages(), $config);
         $fields->addFieldToTab('Root.Packages', $gridField);
         // Summit Add Ons
         $config = GridFieldConfig_RelationEditor::create();
         $config->addComponent(new GridFieldSortableRows('Order'));
         // Remove pagination so that you can sort all add-ons collectively
         $config->removeComponentsByType('GridFieldPaginator');
         $config->removeComponentsByType('GridFieldPageCount');
         $gridField = new GridField('SummitAddOn', 'Sponsor Add Ons', $this->SummitAddOns(), $config);
         $fields->addFieldToTab('Root.AddOns', $gridField);
         $prospectusField = new TextField('SponsorProspectus');
         $fields->addFieldToTab('Root.ProspectusAndContract', $prospectusField);
         $contractField = new TextField('SponsorContract');
         $fields->addFieldToTab('Root.ProspectusAndContract', $contractField);
         // sponsors
         $companies = new GridField('Companies', 'Sponsors', $this->Companies(), GridFieldConfig_RelationEditor::create(10));
         $companies->getConfig()->removeComponentsByType('GridFieldEditButton');
         $companies->getConfig()->removeComponentsByType('GridFieldAddNewButton');
         $companies->getConfig()->getComponentByType('GridFieldDataColumns')->setDisplayFields(array('Name' => 'Name', "DDLSponsorshipType" => "Sponsorship Type", "InputSubmitPageUrl" => "Sponsor Link"));
         $fields->addFieldToTab('Root.SponsorCompanies', $companies);
         $fields->addFieldsToTab("Root.Main", $upload_0 = new UploadField('CrowdImage', 'Crowd Image'));
         $fields->addFieldsToTab("Root.Main", $upload_1 = new UploadField('ExhibitImage', 'Exhibit Image'));
         $upload_0->setFolderName('summits/sponsorship/backgroun');
         $upload_0->setAllowedMaxFileNumber(1);
         $upload_0->setAllowedFileCategories('image');
         $upload_1->setFolderName('summits/sponsorship/background');
         $upload_1->setAllowedMaxFileNumber(1);
         $upload_1->setAllowedFileCategories('image');
         //audience
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent($sort = new GridFieldSortableRows('Order'));
         $gridField = new GridField('AttendeesByRegion', 'Attendees By Region', $this->AttendeesByRegion(), $config);
         $fields->add($gridField);
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent($sort = new GridFieldSortableRows('Order'));
         $gridField = new GridField('AttendeesByRoles', 'Attendees By Roles', $this->AttendeesByRoles(), $config);
         $fields->add($gridField);
     }
     $fields->addFieldsToTab('Root.Audience', new CheckboxField('ShowAudience', 'Show Audience'));
     $fields->addFieldsToTab('Root.Audience', new HtmlEditorField('AudienceIntro', 'Intro'));
     $fields->addFieldsToTab('Root.Audience', new TextField('AudienceMetricsTitle', 'Metrics Title'));
     $fields->addFieldsToTab('Root.Audience', new TextField('AudienceTotalSummitAttendees', 'Total Summit Attendees'));
     $fields->addFieldsToTab('Root.Audience', new TextField('AudienceCompaniesRepresented', 'Companies Represented'));
     $fields->addFieldsToTab('Root.Audience', new TextField('AudienceCountriesRepresented', 'Countries Represented'));
     return $fields;
 }
Exemplo n.º 10
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->add(new TextField('IntroText', 'Intro Text'));
     return $fields;
 }