Skip to content
Browse files

BUG: File Uploading Notifications (fixes #7883)

* Moved allowed file types into a variable to be used in the template.
  • Loading branch information...
1 parent 8a0ae56 commit d61f16d54a564983aca9e70f18e4119cb2c86b7b @adrexia committed Oct 16, 2012
Showing with 2 additions and 9 deletions.
  1. +2 −9 code/controllers/CMSFileAddController.php
View
11 code/controllers/CMSFileAddController.php
@@ -74,20 +74,13 @@ public function getEditForm($id = null, $fields = null) {
$exts = $uploadField->getValidator()->getAllowedExtensions();
asort($exts);
+ $uploadField->Extensions = implode(', ', $exts);
$form = new Form(
$this,
'getEditForm',
new FieldList(
- $uploadField,
- new LiteralField(
- 'AllowedExtensions',
- sprintf(
- '<p>%s: %s</p>',
- _t('AssetAdmin.ALLOWEDEXTS', 'Allowed extensions'),
- implode('<em>, </em>', $exts)
- )
- ),
+ $uploadField,
new HiddenField('ID')
),
new FieldList()

0 comments on commit d61f16d

Please sign in to comment.
Something went wrong with that request. Please try again.