Completed
Push — master ( c54b4a...6e4218 )
by Gordon
05:03
created
code/FooterTextSiteConfig.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
tests/FooterTextSiteConfigTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.