mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUG: File Uploading Notifications (fixes #7883)
* Moved allowed file types into a variable to be used in the template.
This commit is contained in:
parent
8a0ae5653f
commit
d61f16d54a
@ -74,20 +74,13 @@ class CMSFileAddController extends LeftAndMain {
|
|||||||
|
|
||||||
$exts = $uploadField->getValidator()->getAllowedExtensions();
|
$exts = $uploadField->getValidator()->getAllowedExtensions();
|
||||||
asort($exts);
|
asort($exts);
|
||||||
|
$uploadField->Extensions = implode(', ', $exts);
|
||||||
|
|
||||||
$form = new Form(
|
$form = new Form(
|
||||||
$this,
|
$this,
|
||||||
'getEditForm',
|
'getEditForm',
|
||||||
new FieldList(
|
new FieldList(
|
||||||
$uploadField,
|
$uploadField,
|
||||||
new LiteralField(
|
|
||||||
'AllowedExtensions',
|
|
||||||
sprintf(
|
|
||||||
'<p>%s: %s</p>',
|
|
||||||
_t('AssetAdmin.ALLOWEDEXTS', 'Allowed extensions'),
|
|
||||||
implode('<em>, </em>', $exts)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
new HiddenField('ID')
|
new HiddenField('ID')
|
||||||
),
|
),
|
||||||
new FieldList()
|
new FieldList()
|
||||||
|
Loading…
Reference in New Issue
Block a user