public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab("Root.MapDetails", new TextField("MapZoom", "Map Zoom Level (lower number = farther away)")); $fields->addFieldToTab("Root.MapDetails", new DropdownField("MapType", "Map Display Type", array("ROADMAP" => "Roadmap", "SATELLITE" => "Satellite", "HYBRID" => "Hybrid", "TERRAIN" => "Terrain"), "Roadmap")); $fields->addFieldToTab("Root.MapDetails", new TextField("MapAddress", "Address for Map")); $fields->addFieldToTab("Root.MapDetails", new CheckboxField("MapDirections", "Display Directions Widget?")); return $fields; }
public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab("Root.Main", new HTMLEditorField("RedirectText", "Text Explaining PayPal Redirect"), "Metadata"); if (permission::check('ADMIN')) { $fields->addFieldToTab("Root.PayPalSettings", new TextField("PayPalAccount", "PayPal Account (email address)")); } return $fields; }
public function getCMSFields() { $fields = parent::getCMSFields(); $blocked_config = GridFieldConfig::create()->addComponents(new GridFieldToolbarHeader(), new GridFieldAddNewButton('toolbar-header-right'), new GridFieldSortableHeader(), new GridFieldDataColumns(), new GridFieldPaginator(10), new GridFieldEditButton(), new GridFieldDeleteAction(), new GridFieldDetailForm()); $fields->addFieldToTab('Root.AppointmentSettings', new GridField('BlockedAppointmentDates', 'Blocked Appointment Dates', $this->BlockedAppointmentDates(), $blocked_config)); $fields->addFieldToTab("Root.AppointmentSettings", new CheckboxField("BlockWeekends", "Block Weekends?")); $fields->addFieldToTab("Root.AppointmentSettings", new CheckboxSetField("BlockedWeekdays", "Block Weekdays", array(1 => 'Sunday', 2 => 'Monday', 3 => 'Tuesday', 4 => 'Wednesday', 5 => 'Thursday', 6 => 'Friday', 7 => 'Saturday'))); $fields->addFieldToTab('Root.AppointmentSettings', new NumericField('TimeStep', 'Time Step (in time selection)')); $fields->addFieldToTab("Root.AppointmentSettings", new DropdownField("OpenTime", "Opening Time", $this->TimeArray())); $fields->addFieldToTab("Root.AppointmentSettings", new DropdownField("CloseTime", "Closing Time", $this->TimeArray())); $fields->addFieldToTab("Root.AppointmentSettings", new TextField("AutoResponderSubject", "Auto-responder Subject")); $fields->addFieldToTab("Root.AppointmentSettings", new HTMLEditorField("AutoResponder", "Auto-responder Body")); $this->extend('updateCMSFields', $fields); return $fields; }
public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab('Root.Content.Categories', new GridField('JobCategories', 'Job Categories', $this->JobCategories(), GridFieldConfig_RecordEditor::create()->addComponent(new GridFieldSortableRows('SortOrder'), 'GridFieldButtonRow'))); $fields->addFieldToTab('Root.Content.Jobs', new GridField('Positions', 'Position', $this->Positions(), GridFieldConfig_RecordEditor::create()->addComponent(new GridFieldSortableRows('SortOrder'), 'GridFieldButtonRow'))); return $fields; }