/**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new TextField("Title", "Title"));
     $fields->push(new HtmlEditorField("Summary", "Summary"));
     $fields->push(new HtmlEditorField("Description", "Description"));
     $fields->push(new MemberAutoCompleteField("Curator", "Curator"));
     $fields->push($ddl = new DropdownField('ReleaseID', 'Release', OpenStackRelease::get()->map("ID", "Name")));
     $ddl->setEmptyString('-- Select a Release --');
     if ($this->owner->ID > 0) {
         $components_config = new GridFieldConfig_RelationEditor(100);
         $components = new GridField("OpenStackComponents", "Supported Release Components", $this->owner->OpenStackComponents(), $components_config);
         $components_config->getComponentByType('GridFieldAddExistingAutocompleter')->setSearchList($this->getAllowedComponents());
         $components_config->removeComponentsByType('GridFieldAddNewButton');
         //$components_config->addComponent(new GridFieldSortableRows('OpenStackSampleConfig_OpenStackComponents.Order'));
         $fields->push($components);
         $fields->push($ddl = new DropdownField('TypeID', 'Type', OpenStackSampleConfigurationType::get()->filter('ReleaseID', $this->owner->ReleaseID)->map("ID", "Type")));
         $ddl->setEmptyString('-- Select a Configuration Type --');
         $related_notes_config = new GridFieldConfig_RecordEditor(100);
         $related_notes = new GridField("RelatedNotes", "Related Notes", $this->owner->RelatedNotes(), $related_notes_config);
         $related_notes_config->addComponent(new GridFieldSortableRows('Order'));
         $fields->push($related_notes);
     }
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>OpenStack Component</h2>"));
     $fields->push(new TextField("Name", "Name"));
     $fields->push(new TextField("CodeName", "Code Name"));
     $fields->push(new TextField("Description", "Description"));
     $fields->push(new CheckboxField('SupportsVersioning', 'Supports Versioning?'));
     $fields->push(new CheckboxField('SupportsExtensions', 'Supports Extensions?'));
     $fields->push(new CheckboxField('IsCoreService', 'Is Core Service?'));
     $fields->push(new DropdownField('IconClass', 'Font Awesome Icon CSS Class', $this->owner->dbObject('IconClass')->enumValues()));
     $fields->push(new DropdownField('Use', 'OpenStack Usage', $this->owner->dbObject('Use')->enumValues()));
     if ($this->owner->getSupportsVersioning()) {
         $versions_config = new GridFieldConfig_RecordEditor();
         $versions = new GridField("Versions", "Versions", $this->owner->Versions(), $versions_config);
         $fields->push($versions);
     }
     $config = new GridFieldConfig_RecordEditor();
     $config->addComponent(new GridFieldSortableRows('Order'));
     $related_content = new GridField("RelatedContent", "RelatedContent", $this->owner->RelatedContent(), $config);
     $fields->push($related_content);
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>Training</h2>"));
     $fields->push(new TextField("Name", "Name"));
     $fields->push(new HtmlEditorField("Overview", "Overview"));
     $fields->push(new CheckboxField("Active", "Active"));
     $types = TrainingCourseType::get();
     $levels = TrainingCourseLevel::get();
     $companies = Company::get();
     if ($companies) {
         $fields->push(new DropdownField('CompanyID', 'Company', $companies->map("ID", "Name", "Please Select a Company")));
     }
     if ($types && $levels && $this->owner->ID > 0) {
         $config = GridFieldConfig_RecordEditor::create();
         $courses = new GridField('Courses', 'Courses', $this->owner->Courses(), $config);
         $fields->push($courses);
     } else {
         $fields->push(new LiteralField("Warning", "** You can not add any Training Course until you create some Training Course Levels and Training Course Types!."));
     }
     return $fields;
 }
 public function updateCMSFields(FieldList $fields)
 {
     $fields->remove("PhoneNumber");
     $fields->addFieldToTab("Root.Main", TextField::create("PhoneNumber"), "Password");
     $fields->addFieldToTab("Root.Main", TextField::create("Company"), "FirstName");
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>Configuration Management Type</h2>"));
     $fields->push(new TextField("Type", "Type"));
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>Support Channel Type</h2>"));
     $fields->push(new TextField("Type", "Type"));
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>Spoken Language</h2>"));
     $fields->push(new TextField("Name", "Name"));
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>OpenStack Api Version</h2>"));
     $fields->push(new TextField("Version", "Version"));
     $fields->push(new DropdownField('Status', 'Status', $this->owner->dbObject('Status')->enumValues()));
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>MarketPlace Video Type</h2>"));
     $fields->push(new TextField("Type", "Type"));
     $fields->push(new TextField("Title", "Title"));
     $fields->push(new TextField("Description", "Description"));
     $fields->push(new TextField("MaxTotalVideoTime", "Max. Video Length (Seconds)"));
     return $fields;
 }
 public function updateBetterButtonsActions(\FieldList $actions)
 {
     foreach ($actions as $action) {
         if (get_class($action) == 'BetterButton_Delete') {
             $actions->remove($action);
             if ($this->owner->Deleted) {
                 $actions->push($undo = new BetterButtonCustomAction('undoDelete', 'Undo delete'));
                 $actions->push($delete = new BetterButtonCustomAction('forceDelete', 'Really Delete'));
                 $delete->setConfirmation("Are you sure? There is no undo");
                 $delete->addExtraClass('gridfield-better-buttons-delete');
             } else {
                 $actions->push($delete = new BetterButtonCustomAction('softDelete', 'Delete'));
                 $delete->addExtraClass('gridfield-better-buttons-delete');
             }
         }
     }
 }
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new TextField("Type", "Type"));
     $fields->push(new CheckboxField("IsDefault", "Is Default?"));
     if ($this->owner->ID > 0) {
         $config = new GridFieldConfig_RelationEditor(100);
         $configurations = new GridField("SampleConfigurations", "Sample Configurations", $this->owner->SampleConfigurations(), $config);
         $detailFormFields = new FieldList();
         $detailFormFields->push(new CheckBoxField('IsDefault', 'Is Default?'));
         $config->getComponentByType('GridFieldDetailForm')->setFields($detailFormFields);
         $fields->push($configurations);
     }
     return $fields;
 }
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new TextField("MaxInstances", "Max. Instances"));
     $companies = Company::get();
     if ($companies) {
         $fields->push($ddl = new DropdownField('CompanyID', 'Company', $companies->map("ID", "Name")));
         $ddl->setEmptyString("Please Select a Company");
     }
     $market_place_types = MarketPlaceType::get();
     if ($market_place_types) {
         $fields->push($ddl = new DropdownField('MarketPlaceTypeID', 'MarketPlaceType', $market_place_types->map("ID", "Name")));
         $ddl->setEmptyString("Please Select a Market Place Type");
     }
     return $fields;
 }
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $CountryCodes = CountryCodes::$iso_3166_countryCodes;
     $fields->push(new LiteralField("Title", "<h2>Course Schedule </h2>"));
     $fields->push(new TextField("City", "City"));
     $fields->push(new TextField("State", "State"));
     $fields->push(new DropdownField("Country", "Country", $CountryCodes));
     if ($this->owner->ID > 0) {
         $config = GridFieldConfig_RecordEditor::create();
         $config->removeComponentsByType('GridFieldAddExistingAutocompleter');
         $times = new GridField("Times", "Times", $this->owner->Times(), $config);
         $fields->push($times);
     }
     return $fields;
 }
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>Training Course</h2>"));
     $fields->push(new TextField("Name", "Name"));
     $fields->push(new CheckboxField("Online", "Online"));
     //only for online
     $fields->push(new TextField("Link", "Link"));
     $fields->push(new HtmlEditorField("Description", "Description", null));
     $fields->push(new CheckboxField("Paid", "Is Paid"));
     $levels = TrainingCourseLevel::get();
     if ($levels) {
         $level = new DropdownField("LevelID", "Level", TrainingCourseLevel::get()->map("ID", 'Level', '--Select Level--'));
         $fields->push($level);
     }
     if ($this->owner->ID > 0) {
         $config = GridFieldConfig_RecordEditor::create();
         $config->getComponentByType('GridFieldDataColumns')->setDisplayFields(array('City' => 'City', 'State' => 'State', 'Country' => 'Country'));
         $config->removeComponentsByType('GridFieldAddExistingAutocompleter');
         $schedule = new GridField("Schedules", "Schedules", $this->owner->Schedules(), $config);
         $fields->push($schedule);
         $config = GridFieldConfig_RelationEditor::create();
         $config->getComponentByType('GridFieldDataColumns')->setDisplayFields(array('Name' => 'Name'));
         $config->removeComponentsByType('GridFieldAddNewButton');
         $config->removeComponentsByType('GridFieldEditButton');
         $projects = new GridField('Projects', 'Projects', $this->owner->Projects(), $config);
         $config = GridFieldConfig_RelationEditor::create();
         $config->removeComponentsByType('GridFieldAddNewButton');
         $config->removeComponentsByType('GridFieldEditButton');
         $config->getComponentByType('GridFieldDataColumns')->setDisplayFields(array('Name' => 'Name'));
         $prerequisite = new GridField('Prerequisites', 'Prerequisites', $this->owner->Prerequisites(), $config);
         $fields->push($projects);
         $fields->push($prerequisite);
     }
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>Marketplace Type</h2>"));
     $fields->push(new TextField("Name", "Name"));
     $fields->push(new CheckboxField("Active", "Active"));
     if ($this->owner->ID > 0) {
         $slug_field = new TextField('Slug', 'Slug');
         $slug_field->setReadonly(true);
         $slug_field->setDisabled(true);
         $slug_field->performReadonlyTransformation();
         $fields->push($slug_field);
         $group_field = new TextField('Group', 'Group', $this->owner->AdminGroup()->Title);
         $group_field->setReadonly(true);
         $group_field->setDisabled(true);
         $group_field->performReadonlyTransformation();
         $fields->push($group_field);
     }
     return $fields;
 }
 /**
  * @param FieldList $fields
  * @return FieldList|void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $oldFields = $fields->toArray();
     foreach ($oldFields as $field) {
         $fields->remove($field);
     }
     $fields->push(new LiteralField("Title", "<h2>OpenStack Release</h2>"));
     $fields->push(new TextField("Name", "Name"));
     $date = DateField::create('ReleaseDate')->setConfig('showcalendar', true);
     $fields->push($date);
     $date->setTitle('Release Date');
     $fields->push(new TextField("ReleaseNumber", "Release Number"));
     $fields->push(new TextField("ReleaseNotesUrl", "Release Notes Url"));
     $fields->push(new DropdownField('Status', 'Status', $this->owner->dbObject('Status')->enumValues()));
     //components
     if ($this->owner->ID > 0) {
         $components_config = new GridFieldConfig_RelationEditor(100);
         $components = new GridField("OpenStackComponents", "Supported Release Components", $this->owner->OpenStackComponents(), $components_config);
         $components_config->removeComponentsByType('GridFieldAddNewButton');
         $fields->push($components);
         //supported versions
         //only if we have components set
         if ($this->owner->OpenStackComponents()->filter('SupportsVersioning', true)->count() > 0) {
             $supported_versions_config = new GridFieldConfig_RecordEditor(100);
             $dataColumns = $supported_versions_config->getComponentByType('GridFieldDataColumns');
             $dataColumns->setDisplayFields(array('OpenStackComponent.CodeName' => 'Component CodeName', 'OpenStackComponent.Name' => 'Component Name', 'ApiVersion.Version' => 'Api Version'));
             //$supported_versions_config->removeComponentsByType('GridFieldEditButton');
             $supported_versions = new GridField("SupportedApiVersions", "Supported Release Components", $this->owner->SupportedApiVersions(" ReleaseID = {$this->owner->getIdentifier()} AND OpenStackComponent.SupportsVersioning = 1 ")->innerJoin('OpenStackComponent', 'OpenStackComponent.ID = OpenStackReleaseSupportedApiVersion.OpenStackComponentID'), $supported_versions_config);
             $fields->push($supported_versions);
         }
         $config = new GridFieldConfig_RecordEditor(100);
         $config_types = new GridField("SampleConfigurationTypes", "Sample Configuration Types", $this->owner->SampleConfigurationTypes(), $config);
         $config->addComponent(new GridFieldSortableRows('Order'));
         $fields->push($config_types);
     }
     return $fields;
 }
 public function updateCMSFields(FieldList $f)
 {
     //clear all fields
     $oldFields = $f->toArray();
     foreach ($oldFields as $field) {
         $f->remove($field);
     }
     $_REQUEST['SummitID'] = $this->owner->ID;
     $f->add($rootTab = new TabSet("Root", $tabMain = new Tab('Main')));
     $summit_time_zone = null;
     if ($this->owner->TimeZone) {
         $time_zone_list = timezone_identifiers_list();
         $summit_time_zone = $time_zone_list[$this->owner->TimeZone];
     }
     if ($this->owner->RandomVotingLists()->exists()) {
         $f->addFieldToTab('Root.Main', HeaderField::create('The presentations in this summit have been randomised for voting', 4));
     }
     $f->addFieldToTab('Root.Main', new TextField('Title', 'Title'));
     $f->addFieldToTab('Root.Main', $link = new TextField('Link', 'Summit Page Link'));
     $link->setDescription('The link to the site page for this summit. Eg: <em>/summit/vancouver-2015/</em>');
     $f->addFieldToTab('Root.Main', new CheckboxField('Active', 'This is the active summit'));
     $f->addFieldToTab('Root.Main', $date_label = new TextField('DateLabel', 'Date label'));
     $date_label->setDescription('A readable piece of text representing the date, e.g. <em>May 12-20, 2015</em> or <em>December 2016</em>');
     $f->addFieldToTab('Root.Main', $registration_link = new TextField('RegistrationLink', 'Registration Link'));
     $registration_link->setDescription('Link to the site where tickets can be purchased.');
     $f->addFieldsToTab('Root.Dates', $ddl_timezone = new DropdownField('TimeZone', 'Time Zone', DateTimeZone::listIdentifiers()));
     $ddl_timezone->setEmptyString('-- Select a Timezone --');
     if ($summit_time_zone) {
         $f->addFieldToTab('Root.Dates', new HeaderField("All dates below are in <span style='color:red;'>{$summit_time_zone}</span> time."));
     } else {
         $f->addFieldToTab('Root.Dates', new HeaderField("All dates below in the timezone of the summit's venue."));
     }
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('SummitBeginDate', "When does the summit begin?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('SummitEndDate', "When does the summit end?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('StartShowingVenuesDate', "When do you begin showing venues?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('SubmissionBeginDate', "When do submissions begin?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('SubmissionEndDate', "When do submissions end?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('VotingBeginDate', "When does voting begin?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('VotingEndDate', "When does voting end?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('SelectionBeginDate', "When do selections begin?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('SelectionEndDate', "When do selections end?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('RegistrationBeginDate', "When does registration begin?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DatetimeField('RegistrationEndDate', "When does registration end?"));
     $date->getDateField()->setConfig('showcalendar', true);
     $date->getDateField()->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldToTab('Root.Dates', $date = new DateField('ScheduleDefaultStartDate', "Default Start Date to show on schedule page?"));
     $date->setConfig('showcalendar', true);
     $date->setConfig('dateformat', 'dd/MM/yyyy');
     $f->addFieldsToTab('Root.Main', new NumericField('MaxSubmissionAllowedPerUser', 'Max. Submission Allowed Per User'));
     $logo_field = new UploadField('Logo', 'Logo');
     $logo_field->setAllowedMaxFileNumber(1);
     $logo_field->setAllowedFileCategories('image');
     $logo_field->setFolderName('summits/logos/');
     $logo_field->getValidator()->setAllowedMaxFileSize(1024 * 1024 * 1);
     $f->addFieldToTab('Root.Main', $logo_field);
     $f->addFieldToTab('Root.Main', new TextField('ComingSoonBtnText', 'Coming Soon Btn Text'));
     $f->addFieldToTab('Root.Main', new TextField('ExternalEventId', 'Eventbrite Event Id'));
     if ($this->owner->ID > 0) {
         $summit_id = $this->owner->ID;
         // tracks
         $config = GridFieldConfig_RecordEditor::create(25);
         $categories = new GridField('Categories', 'Presentation Categories', $this->owner->getCategories(), $config);
         $f->addFieldToTab('Root.Presentation Categories', $categories);
         $config = GridFieldConfig_RelationEditor::create(25);
         $config->removeComponentsByType(new GridFieldDataColumns());
         $config->removeComponentsByType(new GridFieldDetailForm());
         $config->addComponent(new GridFieldUpdateDefaultCategoryTags());
         $default_tags = new GridField('CategoryDefaultTags', 'Category Default Tags', $this->owner->CategoryDefaultTags(), $config);
         $completer = $config->getComponentByType('GridFieldAddExistingAutocompleter');
         $completer->setResultsFormat('$Tag');
         $completer->setSearchFields(array('Tag'));
         $completer->setSearchList(Tag::get());
         $editconf = new GridFieldDetailForm();
         $editconf->setFields(FieldList::create(TextField::create('Tag', 'Tag'), DropdownField::create('ManyMany[Group]', 'Group', array('topics' => 'Topics', 'speaker' => 'Speaker', 'openstack projects mentioned' => 'OpenStack Projects Mentioned'))));
         $summaryfieldsconf = new GridFieldDataColumns();
         $summaryfieldsconf->setDisplayFields(array('Tag' => 'Tag', 'Group' => 'Group'));
         $config->addComponent($editconf);
         $config->addComponent($summaryfieldsconf, new GridFieldFilterHeader());
         $f->addFieldToTab('Root.Presentation Categories', $default_tags);
         // track groups
         $config = GridFieldConfig_RecordEditor::create(25);
         $config->removeComponentsByType('GridFieldAddNewButton');
         $multi_class_selector = new GridFieldAddNewMultiClass();
         $multi_class_selector->setClasses(array('PresentationCategoryGroup' => 'Category Group', 'PrivatePresentationCategoryGroup' => 'Private Category Group'));
         $config->addComponent($multi_class_selector);
         $categories = new GridField('CategoryGroups', 'Category Groups', $this->owner->CategoryGroups(), $config);
         $f->addFieldToTab('Root.Category Groups', $categories);
         // locations
         $config = GridFieldConfig_RecordEditor::create();
         $config->removeComponentsByType('GridFieldAddNewButton');
         $multi_class_selector = new GridFieldAddNewMultiClass();
         $multi_class_selector->setClasses(array('SummitVenue' => 'Venue', 'SummitHotel' => 'Hotel', 'SummitAirport' => 'Airport', 'SummitExternalLocation' => 'External Location'));
         $config->addComponent($multi_class_selector);
         $config->addComponent($sort = new GridFieldSortableRows('Order'));
         $gridField = new GridField('Locations', 'Locations', $this->owner->Locations()->where("ClassName <> 'SummitVenueRoom' "), $config);
         $f->addFieldToTab('Root.Locations', $gridField);
         // types
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent(new GridFieldAddDefaultSummitTypes());
         $gridField = new GridField('SummitTypes', 'SummitTypes', $this->owner->Types(), $config);
         $f->addFieldToTab('Root.SummitTypes', $gridField);
         // event types
         $config = GridFieldConfig_RecordEditor::create();
         $config->addComponent(new GridFieldAddDefaultEventTypes());
         $gridField = new GridField('EventTypes', 'EventTypes', $this->owner->EventTypes(), $config);
         $f->addFieldToTab('Root.EventTypes', $gridField);
         //schedule
         $config = GridFieldConfig_RecordEditor::create(25);
         $config->addComponent(new GridFieldAjaxRefresh(1000, false));
         $config->removeComponentsByType('GridFieldDeleteAction');
         $gridField = new GridField('Schedule', 'Schedule', $this->owner->Events()->filter('Published', true)->sort(array('StartDate' => 'ASC', 'EndDate' => 'ASC')), $config);
         $config->getComponentByType("GridFieldDataColumns")->setFieldCasting(array("Description" => "HTMLText->BigSummary"));
         $f->addFieldToTab('Root.Schedule', $gridField);
         $config->addComponent(new GridFieldPublishSummitEventAction());
         // events
         $config = GridFieldConfig_RecordEditor::create(25);
         $config->addComponent(new GridFieldPublishSummitEventAction());
         $config->addComponent(new GridFieldAjaxRefresh(1000, false));
         $config->addComponent($bulk_summit_types = new GridFieldBulkActionAssignSummitTypeSummitEvents());
         $bulk_summit_types->setTitle('Set Summit Type');
         $gridField = new GridField('Events', 'Events', $this->owner->Events()->filter('ClassName', 'SummitEvent'), $config);
         $config->getComponentByType("GridFieldDataColumns")->setFieldCasting(array("Description" => "HTMLText->BigSummary"));
         $f->addFieldToTab('Root.Events', $gridField);
         //track selection list presentations
         $config = GridFieldConfig_RecordEditor::create(25);
         $gridField = new GridField('TrackChairsSelectionLists', 'TrackChairs Selection Lists', SummitSelectedPresentationList::get()->filter('ListType', 'Group')->where(' CategoryID IN ( SELECT ID FROM PresentationCategory WHERE SummitID = ' . $summit_id . ')'), $config);
         $f->addFieldToTab('Root.TrackChairs Selection Lists', $gridField);
         // attendees
         $config = GridFieldConfig_RecordEditor::create(25);
         $gridField = new GridField('Attendees', 'Attendees', $this->owner->Attendees(), $config);
         $f->addFieldToTab('Root.Attendees', $gridField);
         //tickets types
         $config = GridFieldConfig_RecordEditor::create(25);
         $gridField = new GridField('SummitTicketTypes', 'Ticket Types', $this->owner->SummitTicketTypes(), $config);
         $f->addFieldToTab('Root.TicketTypes', $gridField);
         // promo codes
         $config = GridFieldConfig_RecordEditor::create(50);
         $config->removeComponentsByType('GridFieldAddNewButton');
         $multi_class_selector = new GridFieldAddNewMultiClass();
         $multi_class_selector->setClasses(array('SpeakerSummitRegistrationPromoCode' => 'Speaker Promo Code'));
         $config->addComponent($multi_class_selector);
         $promo_codes = new GridField('SummitRegistrationPromoCodes', 'Registration Promo Codes', $this->owner->SummitRegistrationPromoCodes(), $config);
         $f->addFieldToTab('Root.RegistrationPromoCodes', $promo_codes);
         // speakers
         $config = GridFieldConfig_RecordEditor::create(25);
         $gridField = new GridField('Speakers', 'Speakers', $this->owner->Speakers(false), $config);
         $config->getComponentByType("GridFieldDataColumns")->setFieldCasting(array("Bio" => "HTMLText->BigSummary"));
         $f->addFieldToTab('Root.Speakers', $gridField);
         // presentations
         $config = GridFieldConfig_RecordEditor::create(25);
         $config->addComponent(new GridFieldPublishSummitEventAction());
         $config->addComponent(new GridFieldAjaxRefresh(1000, false));
         $config->addComponent($bulk_summit_types = new GridFieldBulkActionAssignSummitTypeSummitEvents());
         $bulk_summit_types->setTitle('Set Summit Type');
         $gridField = new GridField('Presentations', 'Presentations', $this->owner->Presentations()->where(" Title IS NOT NULL AND Title <>'' "), $config);
         $config->getComponentByType("GridFieldDataColumns")->setFieldCasting(array("Description" => "HTMLText->BigSummary"));
         $f->addFieldToTab('Root.Presentations', $gridField);
         // push notifications
         $config = GridFieldConfig_RecordEditor::create(25);
         $config->addComponent(new GridFieldAjaxRefresh(1000, false));
         $config->getComponentByType('GridFieldDataColumns')->setDisplayFields(array('Channel' => 'Channel', 'Message' => 'Message', 'Owner.FullName' => 'Owner', 'IsSent' => 'Is Sent?', 'SentDate' => 'Sent Date'));
         $config->getComponentByType('GridFieldDetailForm')->setItemRequestClass('GridFieldDetailFormPushNotification');
         $gridField = new GridField('Notifications', 'Notifications', $this->owner->Notifications(), $config);
         $f->addFieldToTab('Root.PushNotifications', $gridField);
         //entity events
         $config = GridFieldConfig_RecordEditor::create(25);
         $config->addComponent(new GridFieldAjaxRefresh(1000, false));
         $config->addComponent(new GridFieldWipeDevicesDataAction());
         $config->addComponent(new GridFieldDeleteAllSummitEntityEventsAction());
         $config->removeComponentsByType('GridFieldAddNewButton');
         $gridField = new GridField('EntityEvents', 'EntityEvents', $this->owner->EntityEvents(), $config);
         $f->addFieldToTab('Root.EntityEvents', $gridField);
         //TrackChairs
         $config = GridFieldConfig_RecordEditor::create(25);
         $config->addComponent(new GridFieldAjaxRefresh(1000, false));
         $gridField = new GridField('TrackChairs', 'TrackChairs', $this->owner->TrackChairs(), $config);
         $f->addFieldToTab('Root.TrackChairs', $gridField);
         //RSVP templates
         $config = GridFieldConfig_RecordEditor::create(40);
         $config->addComponent(new GridFieldAjaxRefresh(1000, false));
         $gridField = new GridField('RSVPTemplates', 'RSVPTemplates', $this->owner->RSVPTemplates(), $config);
         $f->addFieldToTab('Root.RSVPTemplates', $gridField);
     }
 }