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(
|
$form = new Form(
|
||||||
$this,
|
$this,
|
||||||
'getEditForm',
|
'getEditForm',
|
||||||
new FieldList($uploadField, new HiddenField('ID')),
|
new FieldList(
|
||||||
|
$uploadField,
|
||||||
|
new LiteralField('AllowedExtensions', sprintf('<p>Allowed extensions: %s</p>', implode('</em>, <em>', $uploadField->getValidator()->getAllowedExtensions()))),
|
||||||
|
new HiddenField('ID')
|
||||||
|
),
|
||||||
new FieldList()
|
new FieldList()
|
||||||
);
|
);
|
||||||
$form->addExtraClass('center cms-edit-form ' . $this->BaseCSSClasses());
|
$form->addExtraClass('center cms-edit-form ' . $this->BaseCSSClasses());
|
||||||
@ -121,4 +125,4 @@ class CMSFileAddController extends LeftAndMain {
|
|||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user