Exemplo n.º 1
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->removeByName("Content");
     $fields->removeByName("Metadata");
     $fields->addFieldToTab("Root.Main", new TextField("FirstName", "First Name"));
     $fields->addFieldToTab("Root.Main", new TextField("LastName", "Last Name"));
     $fields->addFieldToTab("Root.Main", new TextField("Position", "Position"));
     $fields->addFieldToTab("Root.Main", new CheckboxSetField("Teams", 'Team <a href="admin/pages/edit/show/14" target="_blank">(Manage Teams)</a>', StaffTeam::get()->map('ID', 'Name')));
     //$fields->addFieldToTab("Root.Main", new LiteralField("TeamLabel", ''));
     $fields->addFieldToTab("Root.Main", new HTMLEditorField("Content", "Biography"));
     $fields->addFieldToTab("Root.Main", new UploadField("Photo", "Photo (dimensions)"));
     $fields->addFieldToTab("Root.Main", new HTMLEditorField("Content", "Biography"));
     return $fields;
 }
 public function StaffTeams()
 {
     $teams = StaffTeam::get();
     return $teams;
 }