mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Indicate which file extensions are allowed to be uploaded when choosing a file to upload.
This commit is contained in:
parent
8166c26a8f
commit
9e54124145
@ -73,9 +73,13 @@ class CMSFileAddController extends LeftAndMain {
|
||||
}
|
||||
|
||||
$form = new Form(
|
||||
$this,
|
||||
'getEditForm',
|
||||
new FieldList($uploadField, new HiddenField('ID')),
|
||||
$this,
|
||||
'getEditForm',
|
||||
new FieldList(
|
||||
$uploadField,
|
||||
new LiteralField('AllowedExtensions', sprintf('<p>Allowed extensions: %s</p>', implode('</em>, <em>', $uploadField->getValidator()->getAllowedExtensions()))),
|
||||
new HiddenField('ID')
|
||||
),
|
||||
new FieldList()
|
||||
);
|
||||
$form->addExtraClass('center cms-edit-form ' . $this->BaseCSSClasses());
|
||||
@ -121,4 +125,4 @@ class CMSFileAddController extends LeftAndMain {
|
||||
return $items;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user