mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
ENHANCEMENT Sort extension names by alphabetical order in CMSFileAddController::getEditForm()
ENHANCEMENT Ensure _t() used for "Allowed extensions" english text.
This commit is contained in:
parent
9e54124145
commit
7c9a1304a5
@ -72,12 +72,22 @@ class CMSFileAddController extends LeftAndMain {
|
|||||||
$uploadField->setFolderName(ASSETS_DIR);
|
$uploadField->setFolderName(ASSETS_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$exts = $uploadField->getValidator()->getAllowedExtensions();
|
||||||
|
asort($exts);
|
||||||
|
|
||||||
$form = new Form(
|
$form = new Form(
|
||||||
$this,
|
$this,
|
||||||
'getEditForm',
|
'getEditForm',
|
||||||
new FieldList(
|
new FieldList(
|
||||||
$uploadField,
|
$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 HiddenField('ID')
|
||||||
),
|
),
|
||||||
new FieldList()
|
new FieldList()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user