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:
Franco Springveldt 2017-08-15 13:52:22 +12:00 committed by GitHub
commit 51c62c4a90

View File

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