BUG: File Uploading Notifications (fixes #7883)

* Moved allowed file types into a variable to be used in the template.
This commit is contained in:
Naomi Guyer 2012-10-16 18:43:10 +13:00
parent 8a0ae5653f
commit d61f16d54a

View File

@ -74,20 +74,13 @@ class CMSFileAddController extends LeftAndMain {
$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()