mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Added "saves into..." label to UploadField template
CMS users shouldn't need to guess where their files will end up.
This commit is contained in:
parent
2beb3519e4
commit
842dc98681
@ -93,6 +93,11 @@ class UploadField extends FileField {
|
||||
* String values are interpreted as permission codes.
|
||||
*/
|
||||
'canAttachExisting' => "CMS_ACCESS_AssetAdmin",
|
||||
/**
|
||||
* @var boolean Shows the target folder for new uploads in the field UI.
|
||||
* Disable to keep the internal filesystem structure hidden from users.
|
||||
*/
|
||||
'canPreviewFolder' => true,
|
||||
/**
|
||||
* @var boolean If a second file is uploaded, should it replace the existing one rather than throwing an errror?
|
||||
* This only applies for has_one relationships, and only replaces the association
|
||||
|
@ -44,13 +44,16 @@
|
||||
</div>
|
||||
<% end_if %>
|
||||
<div class="ss-uploadfield-item-info">
|
||||
<label class="ss-uploadfield-item-name"><b>
|
||||
<label class="ss-uploadfield-item-name">
|
||||
<% if $multiple %>
|
||||
<% _t('UploadField.ATTACHFILES', 'Attach files') %>
|
||||
<b><% _t('UploadField.ATTACHFILES', 'Attach files') %></b>
|
||||
<% else %>
|
||||
<% _t('UploadField.ATTACHFILE', 'Attach a file') %>
|
||||
<b><% _t('UploadField.ATTACHFILE', 'Attach a file') %></b>
|
||||
<% end_if %>
|
||||
</b></label>
|
||||
<% if getConfig('canPreviewFolder') %>
|
||||
<small>(<%t UploadField.UPLOADSINTO 'saves into /{path}' path=$FolderName %>)</small>
|
||||
<% end_if %>
|
||||
</label>
|
||||
<% if canUpload %>
|
||||
<label class="ss-uploadfield-fromcomputer ss-ui-button ui-corner-all" title="<% _t('UploadField.FROMCOMPUTERINFO', 'Upload from your computer') %>" data-icon="drive-upload">
|
||||
<% _t('UploadField.FROMCOMPUTER', 'From your computer') %>
|
||||
|
Loading…
Reference in New Issue
Block a user