mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #645 from robbieaverill/pulls/4.4/remove-default-value-on-filefield
Remove default value field from EditableFileField
This commit is contained in:
commit
51c62c4a90
@ -45,10 +45,14 @@ class EditableFileField extends EditableFormField
|
||||
)
|
||||
);
|
||||
|
||||
$fields->addFieldToTab("Root.Main", new LiteralField("FileUploadWarning",
|
||||
"<p class=\"message notice\">" . _t("UserDefinedForm.FileUploadWarning",
|
||||
"Files uploaded through this field could be publicly accessible if the exact URL is known")
|
||||
. "</p>"), "Type");
|
||||
$fields->addFieldToTab("Root.Main", new LiteralField(
|
||||
"FileUploadWarning",
|
||||
"<p class=\"message notice\">"
|
||||
. _t(
|
||||
"UserDefinedForm.FileUploadWarning",
|
||||
"Files uploaded through this field could be publicly accessible if the exact URL is known"
|
||||
) . "</p>"
|
||||
), "Type");
|
||||
|
||||
$fields->addFieldToTab(
|
||||
'Root.Main',
|
||||
@ -57,6 +61,8 @@ class EditableFileField extends EditableFormField
|
||||
->setDescription("Note: Maximum php allowed size is {$this->getPHPMaxFileSizeMB()} MB")
|
||||
);
|
||||
|
||||
$fields->removeByName('Default');
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user