Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENHANCEMENT Sort extension names by alphabetical order in CMSFileAddC…

…ontroller::getEditForm()

ENHANCEMENT Ensure _t() used for "Allowed extensions" english text.
  • Loading branch information...
commit 7c9a1304a527785eaac58217464070a144ae64e6 1 parent 9e54124
Sean Harvey halkyon authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 code/controllers/CMSFileAddController.php
12 code/controllers/CMSFileAddController.php
View
@@ -72,12 +72,22 @@ public function getEditForm($id = null, $fields = null) {
$uploadField->setFolderName(ASSETS_DIR);
}
+ $exts = $uploadField->getValidator()->getAllowedExtensions();
+ asort($exts);
+
$form = new Form(
$this,
'getEditForm',
new FieldList(
$uploadField,
- new LiteralField('AllowedExtensions', sprintf('<p>Allowed extensions: %s</p>', implode('</em>, <em>', $uploadField->getValidator()->getAllowedExtensions()))),
+ new LiteralField(
+ 'AllowedExtensions',
+ sprintf(
+ '<p>%s: %s</p>',
+ _t('AssetAdmin.ALLOWEDEXTS', 'Allowed extensions'),
+ implode('<em>, </em>', $exts)
+ )
+ ),
new HiddenField('ID')
),
new FieldList()
Please sign in to comment.
Something went wrong with that request. Please try again.