@@ -5,10 +5,10 @@ discard block |
||
5 | 5 | class DataPoint extends DataObject |
6 | 6 | { |
7 | 7 | private static $db = [ |
8 | - 'Title' => 'Varchar', |
|
9 | - 'Description' => 'HTMLText', |
|
10 | - 'XCoordinate' => 'Float', //todo: check if this works or try Varchar |
|
11 | - 'YCoordinate' => 'Float', |
|
8 | + 'Title' => 'Varchar', |
|
9 | + 'Description' => 'HTMLText', |
|
10 | + 'XCoordinate' => 'Float', //todo: check if this works or try Varchar |
|
11 | + 'YCoordinate' => 'Float', |
|
12 | 12 | ]; |
13 | 13 | |
14 | 14 | private static $has_one = [ |
@@ -17,19 +17,19 @@ discard block |
||
17 | 17 | |
18 | 18 | public function getCMSFields() |
19 | 19 | { |
20 | - $fields = parent::getCMSFields(); |
|
21 | - $fields->addFieldToTab( |
|
22 | - 'Root.Main', |
|
23 | - ImageCoordField::create( |
|
24 | - $name = 'DataPointImageCoordinates', |
|
25 | - $xFieldName = 'XCoordinate', |
|
26 | - $yFieldName = 'YCoordinate', |
|
27 | - $imageURL = $this->Parent()->DataPointImage()->Link(), |
|
28 | - $width = $this->Parent()->DataPointImage()->width(), |
|
29 | - $height = $this->Parent()->DataPointImage()->height(), |
|
30 | - $cssGrid = true |
|
31 | - ) |
|
32 | - ); |
|
33 | - return $fields; |
|
20 | + $fields = parent::getCMSFields(); |
|
21 | + $fields->addFieldToTab( |
|
22 | + 'Root.Main', |
|
23 | + ImageCoordField::create( |
|
24 | + $name = 'DataPointImageCoordinates', |
|
25 | + $xFieldName = 'XCoordinate', |
|
26 | + $yFieldName = 'YCoordinate', |
|
27 | + $imageURL = $this->Parent()->DataPointImage()->Link(), |
|
28 | + $width = $this->Parent()->DataPointImage()->width(), |
|
29 | + $height = $this->Parent()->DataPointImage()->height(), |
|
30 | + $cssGrid = true |
|
31 | + ) |
|
32 | + ); |
|
33 | + return $fields; |
|
34 | 34 | } |
35 | 35 | } |