Sometimes has-one UploadFields can get confused about whether or not there is an existing file that needs deleting. This setting lets you make a more robust has-one UploadField, where any existing file will be replaced. It more closely mimics simple single-file upload fields.
This is the companion setting to canUpload, letting you control whether existing files from the asset store can be referenced. It's particularly useful when using UploadField on the front-end.
Although editing meta-data or deleting permanently would require File editing/deleting permissions, merely linking to a record does not. This change is important for allowing front-end use of UploadField; or, more importantly, use of UploadFile by people without CMS rights.
The field carries the configuration, and some non-upload functionality
like "attach files" still relies on the fileupload jQuery plugin
being initialized.
Conflicts:
templates/UploadField.ss
The field carries the configuration, and some non-upload functionality
like "attach files" still relies on the fileupload jQuery plugin
being initialized.
This was a regression made visible by the recent change to
enforce dimensions on this overlay, which in turn visualizes
the blocked/unblocked states of the preview (see fc6d6ffad)
Needed for introspection for many_many relationships
without knowing the name of the relationship,
meaning we can't use DataObject->many_many_extraFields().
Otherwise conditional logic will only succeed
when run through "sake dev/tests", not when
run through phpunit directly (which is the recommended way now)
Ideally we'll have region-less locales like en.js as fallbacks,
but for now this prevents the UI becoming non-operational
e.g. when both i18n::set_locale() and i18n::default_locale()
are set to 'en_NZ'.
Partially reverts "fixes" from 411673ed. This re-introduces the arrow on the main tree node in the CMS ("Your site name"), but that's less important than being able to navigate tree hierarchies in the first place in TreeDropdownField.
The new config setter restores the 2.4 behaviour of including <input type="hidden"> with a field. Although as a default, this option has security flaws; it is useful in a few circumstances and, if nothing else, is handy to make upgrading sites easier.
Same behaviour as with 3.0 bootstrap.php and the
2.4 cli-script.php (which it is based on).
This allows to use GET switches which are evaluated in _config.php
files, e.g. db=<db-alias> settings for running tests
with various DBs without changing the underlying PHP config.