mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR #3629 FileIFrameField If user clicks "Attach file" or "Replace file" without a source file, validation message will appear above the form
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86129 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3f751a2cb8
commit
1912ca960b
@ -118,6 +118,7 @@ class FileIFrameField extends FileField {
|
||||
|| ($data['FileSource'] == 'new' && (!isset($_FILES['Upload']) || !$_FILES['Upload']))
|
||||
|| ($data['FileSource'] == 'existing' && (!isset($data['ExistingFile']) || !$data['ExistingFile']))
|
||||
) {
|
||||
$form->sessionMessage(_t('FileIFrameField.NOSOURCE', 'Please select a source file to attach'), 'required');
|
||||
Director::redirectBack();
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user