| Conditions | 1 |
| Paths | 1 |
| Total Lines | 42 |
| Code Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function updateCMSFields(FieldList $fields) |
||
| 14 | { |
||
| 15 | $fields->addFieldToTab( |
||
| 16 | 'Root.Main', |
||
| 17 | $gaCode = TextField::create( |
||
| 18 | 'GACode', |
||
| 19 | _t('CwpConfig.GaField', 'Google Analytics account') |
||
| 20 | ) |
||
| 21 | ); |
||
| 22 | |||
| 23 | $gaCode->setRightTitle( |
||
| 24 | _t( |
||
| 25 | 'CwpConfig.GaFieldDesc', |
||
| 26 | 'Account number to be used all across the site (in the format <strong>UA-XXXXX-X</strong>)' |
||
| 27 | ) |
||
| 28 | ); |
||
| 29 | |||
| 30 | $fields->findOrMakeTab('Root.SocialMedia', _t('CustomSiteConfig.SocialMediaTab', 'Social Media')); |
||
| 31 | |||
| 32 | $fields->addFieldToTab( |
||
| 33 | 'Root.SocialMedia', |
||
| 34 | $facebookURL = TextField::create( |
||
| 35 | 'FacebookURL', |
||
| 36 | _t('CwpConfig.FbField', 'Facebook UID or username') |
||
| 37 | ) |
||
| 38 | ); |
||
| 39 | $facebookURL->setRightTitle( |
||
| 40 | _t( |
||
| 41 | 'CwpConfig.FbFieldDesc', |
||
| 42 | 'Facebook link (everything after the "http://facebook.com/", eg http://facebook.com/<strong>username</strong> or http://facebook.com/<strong>pages/108510539573</strong>)' |
||
| 43 | ) |
||
| 44 | ); |
||
| 45 | |||
| 46 | $fields->addFieldToTab( |
||
| 47 | 'Root.SocialMedia', |
||
| 48 | $twitterUsername = TextField::create( |
||
| 49 | 'TwitterUsername', |
||
| 50 | _t('CwpConfig.TwitterField', 'Twitter username') |
||
| 51 | ) |
||
| 52 | ); |
||
| 53 | $twitterUsername->setRightTitle( |
||
| 54 | _t('CwpConfig.TwitterFieldDesc', 'Twitter username (eg, http://twitter.com/<strong>username</strong>)') |
||
| 55 | ); |
||
| 58 |