@@ -6,13 +6,13 @@ |
||
| 6 | 6 | 'ColumnWidth' => "Enum('1,2,3,4')" |
| 7 | 7 | ); |
| 8 | 8 | |
| 9 | - function updateCMSFields(FieldList $fields){ |
|
| 9 | + function updateCMSFields(FieldList $fields) { |
|
| 10 | 10 | $footerTabName = 'Root.'._t('SiteConfig.FOOTER', 'Footer'); |
| 11 | - $fields->addFieldToTab($footerTabName, $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
|
| 11 | + $fields->addFieldToTab($footerTabName, $h1 = new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
|
| 12 | 12 | $options1 = singleton('SiteConfig')->dbObject('ColumnStart')->EnumValues(); |
| 13 | 13 | $options2 = singleton('SiteConfig')->dbObject('ColumnWidth')->EnumValues(); |
| 14 | - $columnStartField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_START_COLUMN','Which column (of four) should the footer text start in',$options1)); |
|
| 15 | - $columnWidthField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_WIDTH_COLUMN','How many, of four columns, should the footer text take up',$options2)); |
|
| 14 | + $columnStartField = new DropdownField('ColumnStart', _t('SiteConfig.FOOTER_TEXT_START_COLUMN', 'Which column (of four) should the footer text start in', $options1)); |
|
| 15 | + $columnWidthField = new DropdownField('ColumnStart', _t('SiteConfig.FOOTER_TEXT_WIDTH_COLUMN', 'How many, of four columns, should the footer text take up', $options2)); |
|
| 16 | 16 | //$fields->addFieldToTab("Root.Footer", $columnStartField); |
| 17 | 17 | //$fields->addFieldToTab("Root.Footer", $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
| 18 | 18 | $h1->setRows(6); |
@@ -1,20 +1,20 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class FooterTextSiteConfig extends DataExtension { |
| 3 | - static $db = array( |
|
| 4 | - 'FooterText' => 'HTMLText', |
|
| 5 | - 'ColumnStart' => "Enum('1,2,3,4')", |
|
| 6 | - 'ColumnWidth' => "Enum('1,2,3,4')" |
|
| 7 | - ); |
|
| 3 | + static $db = array( |
|
| 4 | + 'FooterText' => 'HTMLText', |
|
| 5 | + 'ColumnStart' => "Enum('1,2,3,4')", |
|
| 6 | + 'ColumnWidth' => "Enum('1,2,3,4')" |
|
| 7 | + ); |
|
| 8 | 8 | |
| 9 | - function updateCMSFields(FieldList $fields){ |
|
| 10 | - $footerTabName = 'Root.'._t('SiteConfig.FOOTER', 'Footer'); |
|
| 11 | - $fields->addFieldToTab($footerTabName, $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
|
| 12 | - $options1 = singleton('SiteConfig')->dbObject('ColumnStart')->EnumValues(); |
|
| 13 | - $options2 = singleton('SiteConfig')->dbObject('ColumnWidth')->EnumValues(); |
|
| 14 | - $columnStartField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_START_COLUMN','Which column (of four) should the footer text start in',$options1)); |
|
| 15 | - $columnWidthField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_WIDTH_COLUMN','How many, of four columns, should the footer text take up',$options2)); |
|
| 16 | - //$fields->addFieldToTab("Root.Footer", $columnStartField); |
|
| 17 | - //$fields->addFieldToTab("Root.Footer", $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
|
| 18 | - $h1->setRows(6); |
|
| 19 | - } |
|
| 9 | + function updateCMSFields(FieldList $fields){ |
|
| 10 | + $footerTabName = 'Root.'._t('SiteConfig.FOOTER', 'Footer'); |
|
| 11 | + $fields->addFieldToTab($footerTabName, $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
|
| 12 | + $options1 = singleton('SiteConfig')->dbObject('ColumnStart')->EnumValues(); |
|
| 13 | + $options2 = singleton('SiteConfig')->dbObject('ColumnWidth')->EnumValues(); |
|
| 14 | + $columnStartField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_START_COLUMN','Which column (of four) should the footer text start in',$options1)); |
|
| 15 | + $columnWidthField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_WIDTH_COLUMN','How many, of four columns, should the footer text take up',$options2)); |
|
| 16 | + //$fields->addFieldToTab("Root.Footer", $columnStartField); |
|
| 17 | + //$fields->addFieldToTab("Root.Footer", $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
|
| 18 | + $h1->setRows(6); |
|
| 19 | + } |
|
| 20 | 20 | } |
| 21 | 21 | \ No newline at end of file |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | class FooterTextSiteConfigTest extends SapphireTest { |
| 4 | - public function testUpdateCMSFields() { |
|
| 5 | - $this->markTestSkipped('TODO'); |
|
| 6 | - } |
|
| 4 | + public function testUpdateCMSFields() { |
|
| 5 | + $this->markTestSkipped('TODO'); |
|
| 6 | + } |
|
| 7 | 7 | |
| 8 | 8 | } |