mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #627 from creative-commoners/pulls/4.2/submissions-export-fields
FIX submissions export values
This commit is contained in:
commit
eb1fb03e28
@ -55,7 +55,7 @@ class SubmittedFileField extends SubmittedFormField
|
||||
{
|
||||
if ($file = $this->UploadedFile()) {
|
||||
if (trim($file->getFilename(), '/') != trim(ASSETS_DIR, '/')) {
|
||||
return $this->UploadedFile()->URL;
|
||||
return $this->UploadedFile()->AbsoluteLink();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,9 +65,14 @@ class SubmittedForm extends DataObject
|
||||
$self->Values()->sort('Created', 'ASC')
|
||||
);
|
||||
|
||||
$exportColumns = array(
|
||||
'Title' => 'Title',
|
||||
'ExportValue' => 'Value'
|
||||
);
|
||||
|
||||
$config = new GridFieldConfig();
|
||||
$config->addComponent(new GridFieldDataColumns());
|
||||
$config->addComponent(new GridFieldExportButton());
|
||||
$config->addComponent(new GridFieldExportButton('after', $exportColumns));
|
||||
$config->addComponent(new GridFieldPrintButton());
|
||||
$values->setConfig($config);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user