FIX submitted fieldfields in submission details in CMS

If you had a EditableFileField in your userform, the submission table in
the CMS would just say "Array" rather than link to the file, making it fairly
useless
This commit is contained in:
Hamish Friedlander 2013-09-05 09:46:38 +12:00
parent 692220451a
commit 0c39fad116
2 changed files with 3 additions and 3 deletions

View File

@ -25,10 +25,10 @@ class SubmittedFileField extends SubmittedFormField {
$title = _t('SubmittedFileField.DOWNLOADFILE', 'Download File');
if($link) {
return sprintf(
return DBField::create_field('HTMLText', sprintf(
'%s - <a href="%s" target="_blank">%s</a>',
$name, $link, $title
);
));
}
return false;

View File

@ -18,7 +18,7 @@ class SubmittedFormField extends DataObject {
);
private static $summary_fields = array(
'Title',
'Title' => 'Title',
'FormattedValue' => 'Value'
);