Merge pull request #24 from ss23/master

FIX Don't show the upload field when inappropriate
This commit is contained in:
Julian Seidenberg 2013-09-10 22:13:14 -07:00
commit c2639d86d1

View File

@ -57,6 +57,15 @@ class DMSUploadField extends UploadField {
return true;
}
public function isDisabled() {
return (parent::isDisabled() || !$this->isSaveable());
}
public function isSaveable() {
return (!empty($this->getRecord()->ID));
}
/**
* Action to handle upload of a single file
*