canEditProfile()) { $fields = new FieldList ( new TextField('Name', 'Company Name'), new TextField ('URL', 'Company Web Address (URL)'), new LiteralField('Break', '
'), new LiteralField('Break', 'This email address will be displayed on your profile and may be different than your own address.') ); $desc->addExtraClass("company-description"); $contrib->addExtraClass("company-contributions"); $products->addExtraClass("company-products"); $big_logo_validator = new Upload_Image_Validator(); $big_logo_validator->setAllowedExtensions(array('jpg','png','jpeg')); $big_logo_validator->setAllowedMaxImageWidth(500); $big_logo->setCanAttachExisting(false); $big_logo->setAllowedMaxFileNumber(1); $big_logo->setAllowedFileCategories('image'); $big_logo->setCanPreviewFolder(false); // Don't show target filesystem folder on upload field $big_logo->setFolderName('companies/main_logo'); $big_logo->setValidator($big_logo_validator); $small_logo_validator = new Upload_Image_Validator(); $small_logo_validator->setAllowedExtensions(array('jpg','png','jpeg')); $small_logo_validator->setAllowedMaxImageWidth(200); $small_logo->setCanAttachExisting(false); $small_logo->setAllowedMaxFileNumber(1); $small_logo->setAllowedFileCategories('image'); $small_logo->setCanPreviewFolder(false); // Don't show target filesystem folder on upload field $small_logo->setFolderName('companies/main_logo'); $small_logo->setValidator($small_logo_validator); } else if ($company->canEditLogo()) { $fields = new FieldList ( new ReadonlyField('Name', 'Company Name'), new ReadonlyField ('URL', 'Company Web Address (URL)'), new LiteralField('Break', '
'), new LiteralField('Break', '