Ejemplo n.º 1
0
 function getCMSFields()
 {
     $image = new CustomUploadField('Thumbnail', 'Thumbnail');
     //save to path marketing/case_study
     $image->setFolderName('marketing/case_study');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     return new FieldList(new TextField('Name'), new TextField('Tagline'), new TextField('Link'), $image);
 }
Ejemplo n.º 2
0
 function getCMSFields()
 {
     $fields = new FieldList();
     $image = new CustomUploadField('Thumbnail', 'Thumbnail');
     $image->setFolderName('marketing/youtube_vids_thumbs');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     $fields->push(new TextField('Url'));
     $fields->push($image);
 }
Ejemplo n.º 3
0
 function getCMSFields()
 {
     $attach = new CustomUploadField('Attachment', 'File');
     $attach->setFolderName('marketing/graphics');
     $image = new CustomUploadField('Thumbnail', 'Thumbnail');
     $image->setFolderName('marketing/graphics');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     return new FieldList(new TextField('Name'), $image, $attach);
 }
Ejemplo n.º 4
0
 function getCMSFields()
 {
     $fields = new FieldList();
     $image = new CustomUploadField('Image', 'Image');
     $image->setFolderName('marketing/section_link');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     $fields->push(new TextField('Link'));
     $fields->push($image);
     return $fields;
 }
Ejemplo n.º 5
0
 function getCMSFields()
 {
     $fields = new FieldList();
     $image = new CustomUploadField('Thumbnail', 'Thumbnail');
     $image->setFolderName('assets/vid_thumbs');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     $fields->push(new TextField('YoutubeID', 'YouTube ID'));
     $fields->push(new TextField('Caption'));
     $fields->push($image);
     return $fields;
 }
Ejemplo n.º 6
0
 function getCMSFields()
 {
     $fields = new FieldList();
     $files = new GridField('Files', 'Create/Edit File', $this->Files(), GridFieldConfig_RecordEditor::create(10));
     $files->getConfig()->getComponentByType('GridFieldDataColumns')->setDisplayFields(array('Name' => 'FileName', 'SmallPreview' => 'Thumbnail'));
     $image = new CustomUploadField('Thumbnail', 'Thumbnail');
     $image->setFolderName('marketing/graphics');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     $fields->push(new TextField('Name'));
     $fields->push($image);
     if ($this->ID > 0) {
         $fields->push($files);
     }
     return $fields;
 }
Ejemplo n.º 7
0
 function getCMSFields()
 {
     $fields = new FieldList();
     $fields->push(new TextField('Title', 'Title'));
     $fields->push($description = new HtmlEditorField('Description'));
     $description->setRows(5);
     $fields->push(new TextField('ButtonLink', 'Button Link'));
     $fields->push(new TextField('ButtonLabel', 'Button Label'));
     $fields->push(new TextField('SortOrder', 'Sort Order'));
     $image = new CustomUploadField('Image', 'Image');
     $image->setFolderName('marketing');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     $fields->push($image);
     $fields->push(new HiddenField('ParentPageID', 'ParentPageID'));
     return $fields;
 }
 function getCMSFields()
 {
     $fields = new FieldList();
     $fields->push(new TextField('Name', 'Name'));
     $fields->push($description = new HtmlEditorField('Description'));
     $description->setRows(5);
     $fields->push(new TextField('ReleaseLink', 'Release Link'));
     $fields->push(new TextField('SortOrder', 'Sort Order'));
     $fields->push(new TextField('YoutubeID', 'YouTube ID for video Link'));
     //$fields->merge($this->Video()->getCMSFields());
     $image = new CustomUploadField('Logo', 'Logo');
     $image->setFolderName('marketing');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     $fields->push($image);
     $presentation = new UploadField('Presentation', 'Presentation');
     $presentation->setFolderName('marketing');
     $fields->push($presentation);
     $fields->push(new HiddenField('ParentPageID', 'ParentPageID'));
     return $fields;
 }
 function getCMSFields()
 {
     $fields = new FieldList();
     $fields->push(new TextField('Name', 'Name'));
     $fields->push(new CheckboxField('ShowGlobe', 'Show Globe'));
     $fields->push($description = new HtmlEditorField('Description'));
     $description->setRows(5);
     $fields->push(new TextField('SortOrder', 'Sort Order'));
     $image = new CustomUploadField('Image', 'Image');
     $image->setFolderName('marketing');
     $image->setAllowedFileCategories('image');
     $image_validator = new Upload_Validator();
     $image_validator->setAllowedExtensions(array('jpg', 'png', 'jpeg'));
     $image->setValidator($image_validator);
     $fields->push($image);
     $files = new UploadField('CollateralFiles', 'Files', $this->CollateralFiles());
     $files->setFolderName('marketing');
     $fields->push($files);
     $config = new GridFieldConfig_RecordEditor(3);
     $config->addComponent(new GridFieldSortableRows('SortOrder'));
     $fields->push(new GridField('CollateralLinks', 'CollateralLinks', $this->CollateralLinks(), $config));
     $fields->push(new HiddenField('ParentPageID', 'ParentPageID'));
     return $fields;
 }