Browse files

MINOR add 'print button' to Member list and data list of ModelAdmin

  • Loading branch information...
1 parent 63b23a2 commit 2f3949ac6e647dd9ee39a672dec83b687aeae2f2 @normann normann committed Apr 4, 2012
Showing with 2 additions and 0 deletions.
  1. +1 −0 admin/code/ModelAdmin.php
  2. +1 −0 security/Group.php
View
1 admin/code/ModelAdmin.php
@@ -124,6 +124,7 @@ function getEditForm($id = null) {
$fieldConfig = GridFieldConfig_RecordEditor::create($this->stat('page_length'))
->addComponent($exportButton)
->removeComponentsByType('GridFieldFilterHeader')
+ ->addComponents(new GridFieldPrintButton())
);
// Validation
View
1 security/Group.php
@@ -97,6 +97,7 @@ public function getCMSFields() {
if($this->ID) {
$config = new GridFieldConfig_RelationEditor();
$config->addComponents(new GridFieldExportButton());
+ $config->addComponents(new GridFieldPrintButton());
$config->getComponentByType('GridFieldAddExistingAutocompleter')
->setResultsFormat('$Title ($Email)')->setSearchFields(array('FirstName', 'Surname', 'Email'));
$config->getComponentByType('GridFieldDetailForm')->setValidator(new Member_Validator());

0 comments on commit 2f3949a

Please sign in to comment.