| @@ 40-57 (lines=18) @@ | ||
| 37 | /** |
|
| 38 | * @return FieldList |
|
| 39 | */ |
|
| 40 | public function getCMSFields() |
|
| 41 | { |
|
| 42 | $fields = singleton('Block')->getCMSFields(); |
|
| 43 | ||
| 44 | if (class_exists('UserDefinedForm')) { |
|
| 45 | $fields->addFieldToTab('Root.Main', DropdownField::create( |
|
| 46 | 'FormID', |
|
| 47 | 'Form', |
|
| 48 | UserDefinedForm::get()->map() |
|
| 49 | )->setEmptyString('') |
|
| 50 | ->setDescription('select an existing User Defined Form to display') |
|
| 51 | ); |
|
| 52 | } |
|
| 53 | ||
| 54 | $fields->addFieldToTab('Root.Main', HtmlEditorField::create('Content')); |
|
| 55 | ||
| 56 | return $fields; |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * @return Forms|HTMLText |
|
| @@ 52-69 (lines=18) @@ | ||
| 49 | /** |
|
| 50 | * @return FieldList |
|
| 51 | */ |
|
| 52 | public function getCMSFields() |
|
| 53 | { |
|
| 54 | $fields = singleton('Block')->getCMSFields(); |
|
| 55 | ||
| 56 | $fields->addFieldsToTab('Root.Main', array( |
|
| 57 | NumericField::create('Limit'), |
|
| 58 | )); |
|
| 59 | ||
| 60 | if (class_exists('Blog')) { |
|
| 61 | $fields->addFieldToTab( |
|
| 62 | 'Root.Main', |
|
| 63 | DropdownField::create('BlogID', 'Featured Blog', Blog::get()->map()) |
|
| 64 | ->setEmptyString('') |
|
| 65 | ); |
|
| 66 | } |
|
| 67 | ||
| 68 | return $fields; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * @param null $member |
|