Example #1
0
 public function getCMSFields()
 {
     $f = parent::getCMSFields();
     $map_field = new UploadField('Map', 'Map');
     $map_field->setAllowedMaxFileNumber(1);
     $map_field->setFolderName(sprintf('summits/%s/locations/venues/maps/', $this->SummitID));
     $f->addFieldToTab('Root.Main', $map_field);
     $config = GridFieldConfig_RecordEditor::create();
     $gridField = new GridField('Rooms', 'Rooms', $this->Rooms(), $config);
     $f->addFieldToTab('Root.Rooms', $gridField);
     return $f;
 }
 public function getCMSFields()
 {
     $f = parent::getCMSFields();
     $f->addFieldsToTab('Root.Main', new CheckboxField('IsMain', 'Is Main?'));
     $config = GridFieldConfig_RecordEditor::create();
     $gridField = new GridField('Rooms', 'Rooms', $this->Rooms(), $config);
     $f->addFieldToTab('Root.Rooms', $gridField);
     $config = GridFieldConfig_RecordEditor::create();
     $gridField = new GridField('Floors', 'Floors', $this->Floors(), $config);
     $f->addFieldToTab('Root.Floors', $gridField);
     $_REQUEST['VenueID'] = $this->ID;
     return $f;
 }
 public function getCMSFields()
 {
     $f = parent::getCMSFields();
     $f->addFieldToTab('Root.Main', new TextField('Capacity', 'Capacity'));
     return $f;
 }