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:
Ingo Schommer 2013-05-13 16:53:02 +02:00
parent 2beb3519e4
commit 842dc98681
2 changed files with 13 additions and 5 deletions

View File

@ -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

View File

@ -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') %>