/** * Quick smoke test to ensure that text with unicodes is being displayed properly in readonly fields. */ public function testReadonlyDisplayUnicodes() { $inputText = "These are some unicodes: äöü"; $field = new TextareaField("Test", "Test"); $field->setValue($inputText); $field = $field->performReadonlyTransformation(); $this->assertContains('These are some unicodes: äöü', $field->Field()); }
/** * @inheritdoc */ public function updateCMSFields(FieldList $fields) { $analyticsFields = FieldList::create(TextField::create("GoogleAnalyticsTrackingID", "Google Analytics Tracking ID")->setDescription("e.g. UA-XXXXXX-X"), TextareaField::create("GoogleAnalyticsParameters", "Additional Parameters")->setDescription("<strong>Advanced users only.</strong>\n\t\t\t\t\tIf you do not know what this field does, please leave it blank."), TextareaField::create("GoogleAnalyticsConstructorParameters", "Constructor Parameters")->setDescription("<strong>Advanced users only.</strong>\n\t\t\t\t\tIf you do not know what this field does, please leave it blank. An object to be\n\t\t\t\t\tpassed as an argument to ga.create()")); $fields->addFieldToTab('Root', Tab::create('GoogleAnalytics')->setChildren($analyticsFields)); }
public function Field($properties = array()) { // Include requirements $this->getEditorConfig()->init(); return parent::Field($properties); }