Added more fields (AssetField, LiteralField, ConfirmedPasswordField)

This commit is contained in:
Ingo Schommer 2016-06-16 13:31:34 +12:00
parent a499292bb4
commit d7d2afe250

View File

@ -35,6 +35,7 @@ class BasicFieldsTestPage extends TestPage
'CreditCard' => 'Varchar', 'CreditCard' => 'Varchar',
'GSTNumber' => 'Varchar', 'GSTNumber' => 'Varchar',
'OptionSet' => 'Int', 'OptionSet' => 'Int',
'DBFile' => 'DBFile',
); );
private static $has_one = array( private static $has_one = array(
@ -134,7 +135,8 @@ class BasicFieldsTestPage extends TestPage
Object::create('TextField', 'Text', 'TextField'), Object::create('TextField', 'Text', 'TextField'),
Object::create('HtmlEditorField', 'HTMLField', 'HtmlEditorField'), Object::create('HtmlEditorField', 'HTMLField', 'HtmlEditorField'),
Object::create('EmailField', 'Email', 'EmailField'), Object::create('EmailField', 'Email', 'EmailField'),
Object::create('PasswordField', 'Password', 'PasswordField') Object::create('PasswordField', 'Password', 'PasswordField'),
Object::create('ConfirmedPasswordField', 'ConfirmedPasswordField', 'ConfirmedPasswordField')
)); ));
$fields->addFieldsToTab('Root.Numeric', array( $fields->addFieldsToTab('Root.Numeric', array(
@ -193,6 +195,7 @@ class BasicFieldsTestPage extends TestPage
$dateTimeShowCalendar->getTimeField()->setConfig('showdropdown', true); $dateTimeShowCalendar->getTimeField()->setConfig('showdropdown', true);
$fields->addFieldsToTab('Root.File', array( $fields->addFieldsToTab('Root.File', array(
AssetField::create('DBFile'),
$bla = UploadField::create('File', 'FileUploadField') $bla = UploadField::create('File', 'FileUploadField')
->setDescription($description) ->setDescription($description)
->setConfig('allowedMaxFileNumber', 1) ->setConfig('allowedMaxFileNumber', 1)
@ -252,6 +255,10 @@ class BasicFieldsTestPage extends TestPage
LabelField::create('LabelField', 'LabelField') LabelField::create('LabelField', 'LabelField')
); );
$fields->addFieldToTab('Root.Text',
LiteralField::create('LiteralField', 'LiteralField')
);
$fields->addFieldToTab('Root.Text', $fields->addFieldToTab('Root.Text',
FieldGroup::create( FieldGroup::create(
TextField::create('MyFieldGroup1'), TextField::create('MyFieldGroup1'),