mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Compat with SS4 namespaces
See https://github.com/silverstripe/silverstripe-framework/issues/5637
This commit is contained in:
parent
c3f64d7ddc
commit
7720748b34
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
|
use SilverStripe\Assets\File;
|
||||||
|
use SilverStripe\SiteConfig\SiteConfig;
|
||||||
|
use SilverStripe\Control\Director;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Member::add_extension('FrameworkTestRole');
|
Member::add_extension('FrameworkTestRole');
|
||||||
@ -14,10 +18,6 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
|||||||
CMSWorkflowSiteConfigDecorator::apply_active_config();
|
CMSWorkflowSiteConfigDecorator::apply_active_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
Director::addRules(100, array(
|
|
||||||
'dev/regress/$Action/$ID' => 'FrameworktestRegressSessionAdmin'
|
|
||||||
));
|
|
||||||
|
|
||||||
if(@$_GET['db']) {
|
if(@$_GET['db']) {
|
||||||
$enabletranslatable = @$_GET['enabletranslatable'];
|
$enabletranslatable = @$_GET['enabletranslatable'];
|
||||||
} elseif(@$_SESSION['db']) {
|
} elseif(@$_SESSION['db']) {
|
||||||
|
6
_config/routes.yml
Normal file
6
_config/routes.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
Name: frameworktestroutes
|
||||||
|
---
|
||||||
|
SilverStripe\Control\Director:
|
||||||
|
rules:
|
||||||
|
'dev/regress/$Action/$ID': 'FrameworktestRegressSessionAdmin'
|
@ -4,6 +4,20 @@ use SilverStripe\ORM\DataObject;
|
|||||||
use SilverStripe\FrameworkTest\Model\TestCategory;
|
use SilverStripe\FrameworkTest\Model\TestCategory;
|
||||||
use SilverStripe\FrameworkTest\Model\TestPage;
|
use SilverStripe\FrameworkTest\Model\TestPage;
|
||||||
use SilverStripe\FrameworkTest\Model\TestPage_Controller;
|
use SilverStripe\FrameworkTest\Model\TestPage_Controller;
|
||||||
|
use SilverStripe\Core\Object;
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
|
use SilverStripe\Forms\SelectionGroup_Item;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\AssetField;
|
||||||
|
use SilverStripe\Forms\UploadField;
|
||||||
|
use SilverStripe\Forms\LabelField;
|
||||||
|
use SilverStripe\Forms\LiteralField;
|
||||||
|
use SilverStripe\Forms\DropdownField;
|
||||||
|
use SilverStripe\Forms\CheckboxField;
|
||||||
|
use SilverStripe\Forms\FieldGroup;
|
||||||
|
use SilverStripe\Forms\CompositeField;
|
||||||
|
use SilverStripe\Forms\RequiredFields;
|
||||||
|
|
||||||
|
|
||||||
class BasicFieldsTestPage extends TestPage
|
class BasicFieldsTestPage extends TestPage
|
||||||
{
|
{
|
||||||
@ -46,17 +60,17 @@ class BasicFieldsTestPage extends TestPage
|
|||||||
private static $has_one = array(
|
private static $has_one = array(
|
||||||
'Dropdown' => 'SilverStripe\\FrameworkTest\\Model\\TestCategory',
|
'Dropdown' => 'SilverStripe\\FrameworkTest\\Model\\TestCategory',
|
||||||
'GroupedDropdown' => 'SilverStripe\\FrameworkTest\\Model\\TestCategory',
|
'GroupedDropdown' => 'SilverStripe\\FrameworkTest\\Model\\TestCategory',
|
||||||
'File' => 'File',
|
'File' => 'SilverStripe\\Assets\\File',
|
||||||
'AttachedFile' => 'File',
|
'AttachedFile' => 'SilverStripe\\Assets\\File',
|
||||||
'Image' => 'Image',
|
'Image' => 'SilverStripe\\Assets\\Image',
|
||||||
);
|
);
|
||||||
|
|
||||||
private static $has_many = array(
|
private static $has_many = array(
|
||||||
'HasManyFiles' => 'File',
|
'HasManyFiles' => 'SilverStripe\\Assets\\File',
|
||||||
);
|
);
|
||||||
|
|
||||||
private static $many_many = array(
|
private static $many_many = array(
|
||||||
'ManyManyFiles' => 'File',
|
'ManyManyFiles' => 'SilverStripe\\Assets\\File',
|
||||||
'MultipleListboxField' => 'SilverStripe\\FrameworkTest\\Model\\TestCategory',
|
'MultipleListboxField' => 'SilverStripe\\FrameworkTest\\Model\\TestCategory',
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -132,39 +146,39 @@ class BasicFieldsTestPage extends TestPage
|
|||||||
$rightTitle = 'This is right title';
|
$rightTitle = 'This is right title';
|
||||||
|
|
||||||
$fields->addFieldsToTab('Root.Text', array(
|
$fields->addFieldsToTab('Root.Text', array(
|
||||||
Object::create('TextField', 'Required', 'Required field')
|
Object::create('SilverStripe\\Forms\\TextField', 'Required', 'Required field')
|
||||||
->setRightTitle('right title'),
|
->setRightTitle('right title'),
|
||||||
Object::create('TextField', 'Validated', 'Validated field (checks range between 1 and 3)'),
|
Object::create('SilverStripe\\Forms\\TextField', 'Validated', 'Validated field (checks range between 1 and 3)'),
|
||||||
Object::create('ReadonlyField', 'Readonly', 'ReadonlyField'),
|
Object::create('SilverStripe\\Forms\\ReadonlyField', 'Readonly', 'SilverStripe\\Forms\\ReadonlyField'),
|
||||||
Object::create('TextareaField', 'Textarea', 'TextareaField - 8 rows')
|
Object::create('SilverStripe\\Forms\\TextareaField', 'Textarea', 'TextareaField - 8 rows')
|
||||||
->setRows(8),
|
->setRows(8),
|
||||||
Object::create('TextField', 'Text', 'TextField'),
|
Object::create('SilverStripe\\Forms\\TextField', 'Text', 'SilverStripe\\Forms\\TextField'),
|
||||||
Object::create('HtmlEditorField', 'HTMLField', 'HtmlEditorField'),
|
Object::create('SilverStripe\\Forms\\HTMLEditor\\HTMLEditorField', 'HTMLField', 'HtmlEditorField'),
|
||||||
Object::create('EmailField', 'Email', 'EmailField'),
|
Object::create('SilverStripe\\Forms\\EmailField', 'SilverStripe\\Control\\Email\\Email', 'SilverStripe\\Forms\\EmailField'),
|
||||||
Object::create('PasswordField', 'Password', 'PasswordField'),
|
Object::create('SilverStripe\\Forms\\PasswordField', 'Password', 'SilverStripe\\Forms\\PasswordField'),
|
||||||
Object::create('ConfirmedPasswordField', 'ConfirmedPasswordField', 'ConfirmedPasswordField')
|
Object::create('SilverStripe\\Forms\\ConfirmedPasswordField', 'SilverStripe\\Forms\\ConfirmedPasswordField', 'SilverStripe\\Forms\\ConfirmedPasswordField')
|
||||||
));
|
));
|
||||||
|
|
||||||
$fields->addFieldsToTab('Root.Numeric', array(
|
$fields->addFieldsToTab('Root.Numeric', array(
|
||||||
Object::create('NumericField', 'Number', 'NumericField'),
|
Object::create('SilverStripe\\Forms\\NumericField', 'Number', 'SilverStripe\\Forms\\NumericField'),
|
||||||
Object::create('CurrencyField', 'Price', 'CurrencyField'),
|
Object::create('SilverStripe\\Forms\\CurrencyField', 'Price', 'SilverStripe\\Forms\\CurrencyField'),
|
||||||
Object::create('MoneyField', 'Money', 'MoneyField', array('Amount' => 99.99, 'Currency' => 'EUR')),
|
Object::create('SilverStripe\\Forms\\MoneyField', 'Money', 'SilverStripe\\Forms\\MoneyField', array('Amount' => 99.99, 'Currency' => 'EUR')),
|
||||||
Object::create('PhoneNumberField', 'PhoneNumber', 'PhoneNumberField'),
|
Object::create('SilverStripe\\Forms\\PhoneNumberField', 'PhoneNumber', 'SilverStripe\\Forms\\PhoneNumberField'),
|
||||||
Object::create('CreditCardField', 'CreditCard', 'CreditCardField')
|
Object::create('SilverStripe\\Forms\\CreditCardField', 'CreditCard', 'SilverStripe\\Forms\\CreditCardField')
|
||||||
));
|
));
|
||||||
|
|
||||||
$fields->addFieldsToTab('Root.Option', array(
|
$fields->addFieldsToTab('Root.Option', array(
|
||||||
Object::create('CheckboxField', 'Checkbox', 'CheckboxField'),
|
Object::create('SilverStripe\\Forms\\CheckboxField', 'Checkbox', 'SilverStripe\\Forms\\CheckboxField'),
|
||||||
Object::create('CheckboxSetField', 'CheckboxSet', 'CheckboxSetField', TestCategory::map()),
|
Object::create('SilverStripe\\Forms\\CheckboxSetField', 'CheckboxSet', 'SilverStripe\\Forms\\CheckboxSetField', TestCategory::map()),
|
||||||
Object::create('DropdownField', 'DropdownID', 'DropdownField', TestCategory::map())
|
Object::create('SilverStripe\\Forms\\DropdownField', 'DropdownID', 'SilverStripe\\Forms\\DropdownField', TestCategory::map())
|
||||||
->setHasEmptyDefault(true),
|
->setHasEmptyDefault(true),
|
||||||
Object::create('GroupedDropdownField', 'GroupedDropdownID',
|
Object::create('SilverStripe\\Forms\\GroupedDropdownField', 'GroupedDropdownID',
|
||||||
'GroupedDropdown', array('Test Categorys' => TestCategory::map())
|
'GroupedDropdown', array('Test Categorys' => TestCategory::map())
|
||||||
),
|
),
|
||||||
Object::create('ListboxField', 'MultipleListboxFieldID', 'ListboxField (multiple)', TestCategory::map())
|
Object::create('SilverStripe\\Forms\\ListboxField', 'MultipleListboxFieldID', 'ListboxField (multiple)', TestCategory::map())
|
||||||
->setSize(3),
|
->setSize(3),
|
||||||
Object::create('OptionsetField', 'OptionSet', 'OptionSetField', TestCategory::map()),
|
Object::create('SilverStripe\\Forms\\OptionsetField', 'OptionSet', 'OptionSetField', TestCategory::map()),
|
||||||
Object::create('SelectionGroup', 'SelectionGroup', array(
|
Object::create('SilverStripe\\Forms\\SelectionGroup', 'SilverStripe\\Forms\\SelectionGroup', array(
|
||||||
new SelectionGroup_Item(
|
new SelectionGroup_Item(
|
||||||
'one',
|
'one',
|
||||||
TextField::create('SelectionGroupOne', 'one view'),
|
TextField::create('SelectionGroupOne', 'one view'),
|
||||||
@ -176,22 +190,22 @@ class BasicFieldsTestPage extends TestPage
|
|||||||
'SelectionGroup Option Two'
|
'SelectionGroup Option Two'
|
||||||
)
|
)
|
||||||
)),
|
)),
|
||||||
Object::create('ToggleCompositeField', 'ToggleCompositeField', 'ToggleCompositeField', new FieldList(
|
Object::create('SilverStripe\\Forms\\ToggleCompositeField', 'SilverStripe\\Forms\\ToggleCompositeField', 'SilverStripe\\Forms\\ToggleCompositeField', new FieldList(
|
||||||
Object::create('TextField', 'ToggleCompositeTextField1'),
|
Object::create('SilverStripe\\Forms\\TextField', 'ToggleCompositeTextField1'),
|
||||||
Object::create('TextField', 'ToggleCompositeTextField2'),
|
Object::create('SilverStripe\\Forms\\TextField', 'ToggleCompositeTextField2'),
|
||||||
Object::create('DropdownField', 'ToggleCompositeDropdownField', 'ToggleCompositeDropdownField', TestCategory::map()),
|
Object::create('SilverStripe\\Forms\\DropdownField', 'ToggleCompositeDropdownField', 'ToggleCompositeDropdownField', TestCategory::map()),
|
||||||
Object::create('TextField', 'ToggleCompositeTextField3')
|
Object::create('SilverStripe\\Forms\\TextField', 'ToggleCompositeTextField3')
|
||||||
))
|
))
|
||||||
));
|
));
|
||||||
|
|
||||||
// All these date/time fields generally have issues saving directly in the CMS
|
// All these date/time fields generally have issues saving directly in the CMS
|
||||||
$fields->addFieldsToTab('Root.DateTime', array(
|
$fields->addFieldsToTab('Root.DateTime', array(
|
||||||
$calendarDateField = Object::create('DateField', 'CalendarDate', 'DateField with calendar'),
|
$calendarDateField = Object::create('SilverStripe\\Forms\\DateField', 'CalendarDate', 'DateField with calendar'),
|
||||||
Object::create('DateField', 'Date', 'DateField'),
|
Object::create('SilverStripe\\Forms\\DateField', 'Date', 'SilverStripe\\Forms\\DateField'),
|
||||||
$dmyDateField = Object::create('DateField', 'DMYDate', 'DateField with separate fields'),
|
$dmyDateField = Object::create('SilverStripe\\Forms\\DateField', 'DMYDate', 'DateField with separate fields'),
|
||||||
Object::create('TimeField', 'Time', 'TimeField'),
|
Object::create('SilverStripe\\Forms\\TimeField', 'Time', 'SilverStripe\\Forms\\TimeField'),
|
||||||
Object::create('DatetimeField', 'DateTime', 'DateTime'),
|
Object::create('SilverStripe\\Forms\\DatetimeField', 'DateTime', 'DateTime'),
|
||||||
$dateTimeShowCalendar = Object::create('DatetimeField', 'DateTimeWithCalendar', 'DateTime with calendar')
|
$dateTimeShowCalendar = Object::create('SilverStripe\\Forms\\DatetimeField', 'DateTimeWithCalendar', 'DateTime with calendar')
|
||||||
));
|
));
|
||||||
$calendarDateField->setConfig('showcalendar', true);
|
$calendarDateField->setConfig('showcalendar', true);
|
||||||
$dmyDateField->setConfig('dmyfields', true);
|
$dmyDateField->setConfig('dmyfields', true);
|
||||||
@ -201,7 +215,7 @@ class BasicFieldsTestPage extends TestPage
|
|||||||
|
|
||||||
$fields->addFieldsToTab('Root.File', array(
|
$fields->addFieldsToTab('Root.File', array(
|
||||||
AssetField::create('DBFile'),
|
AssetField::create('DBFile'),
|
||||||
$bla = UploadField::create('File', 'FileUploadField')
|
$bla = UploadField::create('SilverStripe\\Assets\\File', 'FileUploadField')
|
||||||
->setDescription($description)
|
->setDescription($description)
|
||||||
->setRightTitle($rightTitle)
|
->setRightTitle($rightTitle)
|
||||||
->setConfig('allowedMaxFileNumber', 1)
|
->setConfig('allowedMaxFileNumber', 1)
|
||||||
@ -210,7 +224,7 @@ class BasicFieldsTestPage extends TestPage
|
|||||||
->setDescription($description)
|
->setDescription($description)
|
||||||
->setRightTitle($rightTitle)
|
->setRightTitle($rightTitle)
|
||||||
->setConfig('canUpload', false),
|
->setConfig('canUpload', false),
|
||||||
UploadField::create('Image', 'UploadField for image')
|
UploadField::create('SilverStripe\\Assets\\Image', 'UploadField for image')
|
||||||
->setDescription($description)
|
->setDescription($description)
|
||||||
->setRightTitle($rightTitle),
|
->setRightTitle($rightTitle),
|
||||||
UploadField::create('HasManyFiles', 'UploadField for has_many')
|
UploadField::create('HasManyFiles', 'UploadField for has_many')
|
||||||
@ -230,7 +244,7 @@ class BasicFieldsTestPage extends TestPage
|
|||||||
}
|
}
|
||||||
|
|
||||||
$blacklist = array(
|
$blacklist = array(
|
||||||
'DMYDate', 'Required', 'Validated', 'ToggleCompositeField', 'SelectionGroup'
|
'DMYDate', 'Required', 'Validated', 'SilverStripe\\Forms\\ToggleCompositeField', 'SilverStripe\\Forms\\SelectionGroup'
|
||||||
);
|
);
|
||||||
|
|
||||||
$tabs = array('Root.Text', 'Root.Numeric', 'Root.Option', 'Root.DateTime', 'Root.File');
|
$tabs = array('Root.Text', 'Root.Numeric', 'Root.Option', 'Root.DateTime', 'Root.File');
|
||||||
@ -264,11 +278,11 @@ class BasicFieldsTestPage extends TestPage
|
|||||||
$fields->addFieldToTab('Root.Text', $noLabelField, 'Text_disabled');
|
$fields->addFieldToTab('Root.Text', $noLabelField, 'Text_disabled');
|
||||||
|
|
||||||
$fields->addFieldToTab('Root.Text',
|
$fields->addFieldToTab('Root.Text',
|
||||||
LabelField::create('LabelField', 'LabelField')
|
LabelField::create('SilverStripe\\Forms\\LabelField', 'SilverStripe\\Forms\\LabelField')
|
||||||
);
|
);
|
||||||
|
|
||||||
$fields->addFieldToTab('Root.Text',
|
$fields->addFieldToTab('Root.Text',
|
||||||
LiteralField::create('LiteralField', '<div class="form__divider">LiteralField with <b>some bold text</b> and <a href="http://silverstripe.com">a link</a></div>')
|
LiteralField::create('SilverStripe\\Forms\\LiteralField', '<div class="form__divider">LiteralField with <b>some bold text</b> and <a href="http://silverstripe.com">a link</a></div>')
|
||||||
);
|
);
|
||||||
|
|
||||||
$fields->addFieldToTab('Root.Text',
|
$fields->addFieldToTab('Root.Text',
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
namespace SilverStripe\FrameworkTest\Model;
|
namespace SilverStripe\FrameworkTest\Model;
|
||||||
|
|
||||||
|
|
||||||
use UploadField;
|
|
||||||
|
|
||||||
|
|
||||||
use SilverStripe\ORM\ValidationResult;
|
use SilverStripe\ORM\ValidationResult;
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\ORM\DB;
|
use SilverStripe\ORM\DB;
|
||||||
|
use SilverStripe\Forms\UploadField;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +37,7 @@ class Company extends DataObject
|
|||||||
|
|
||||||
private static $has_many = array(
|
private static $has_many = array(
|
||||||
'Employees' => 'SilverStripe\\FrameworkTest\\Model\\Employee',
|
'Employees' => 'SilverStripe\\FrameworkTest\\Model\\Employee',
|
||||||
'GroupPhotos' => 'Image'
|
'GroupPhotos' => 'SilverStripe\\Assets\\Image'
|
||||||
);
|
);
|
||||||
|
|
||||||
private static $many_many = array(
|
private static $many_many = array(
|
||||||
@ -76,7 +78,7 @@ class Company extends DataObject
|
|||||||
$fields->addFieldToTab('Root.Main',
|
$fields->addFieldToTab('Root.Main',
|
||||||
$uploadField = UploadField::create('GroupPhotos')
|
$uploadField = UploadField::create('GroupPhotos')
|
||||||
);
|
);
|
||||||
if (method_exists('UploadField', 'setAllowedFileCategories')) {
|
if (method_exists('SilverStripe\\Forms\\UploadField', 'setAllowedFileCategories')) {
|
||||||
$uploadField->setAllowedFileCategories('image');
|
$uploadField->setAllowedFileCategories('image');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,11 +3,14 @@
|
|||||||
namespace SilverStripe\FrameworkTest\Model;
|
namespace SilverStripe\FrameworkTest\Model;
|
||||||
|
|
||||||
|
|
||||||
use NumericField;
|
|
||||||
use TextField;
|
|
||||||
|
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\ORM\DB;
|
use SilverStripe\ORM\DB;
|
||||||
|
use SilverStripe\Forms\NumericField;
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -25,7 +28,7 @@ class Employee extends DataObject
|
|||||||
|
|
||||||
private static $has_one = array(
|
private static $has_one = array(
|
||||||
'Company' => 'SilverStripe\\FrameworkTest\\Model\\Company',
|
'Company' => 'SilverStripe\\FrameworkTest\\Model\\Company',
|
||||||
'ProfileImage' => 'Image'
|
'ProfileImage' => 'SilverStripe\\Assets\\Image'
|
||||||
);
|
);
|
||||||
|
|
||||||
private static $belongs_many_many = array(
|
private static $belongs_many_many = array(
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use SilverStripe\Dev\BuildTask;
|
||||||
/**
|
/**
|
||||||
* Creates sample page structure, useful to test tree performance,
|
* Creates sample page structure, useful to test tree performance,
|
||||||
* UI behaviour on deeply nested pages etc.
|
* UI behaviour on deeply nested pages etc.
|
||||||
|
@ -4,7 +4,7 @@ use SilverStripe\ORM\DataExtension;
|
|||||||
class FileUploadRole extends DataExtension
|
class FileUploadRole extends DataExtension
|
||||||
{
|
{
|
||||||
private static $has_one = array(
|
private static $has_one = array(
|
||||||
'AFile' => 'File',
|
'AFile' => 'SilverStripe\\Assets\\File',
|
||||||
'AImage' => 'Image',
|
'AImage' => 'SilverStripe\\Assets\\Image',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,9 @@ use SilverStripe\ORM\DataObject;
|
|||||||
use SilverStripe\ORM\DB;
|
use SilverStripe\ORM\DB;
|
||||||
use SilverStripe\ORM\DataExtension;
|
use SilverStripe\ORM\DataExtension;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\TreeDropdownField;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class FrameworkTestRole extends DataExtension
|
class FrameworkTestRole extends DataExtension
|
||||||
|
@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
use SilverStripe\Security\Permission;
|
use SilverStripe\Security\Permission;
|
||||||
use SilverStripe\Security\Security;
|
use SilverStripe\Security\Security;
|
||||||
|
use SilverStripe\Control\Controller;
|
||||||
|
use SilverStripe\Control\Session;
|
||||||
|
use SilverStripe\Forms\FormAction;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\HeaderField;
|
||||||
|
use SilverStripe\Forms\LiteralField;
|
||||||
|
use SilverStripe\Forms\DropdownField;
|
||||||
|
use SilverStripe\Forms\CheckboxField;
|
||||||
|
use SilverStripe\Forms\Form;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a test session with various configurations set in session.
|
* Starts a test session with various configurations set in session.
|
||||||
@ -43,7 +53,7 @@ class FrameworktestRegressSessionAdmin extends Controller
|
|||||||
|
|
||||||
$form = new Form(
|
$form = new Form(
|
||||||
$this,
|
$this,
|
||||||
'Form',
|
'SilverStripe\\Forms\\Form',
|
||||||
new FieldList(
|
new FieldList(
|
||||||
new HeaderField('Header1', ($isRunning) ? 'Session is already running' : 'Start new regress session'),
|
new HeaderField('Header1', ($isRunning) ? 'Session is already running' : 'Start new regress session'),
|
||||||
new LiteralField('Lit1',
|
new LiteralField('Lit1',
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
use SilverStripe\ORM\DataList;
|
use SilverStripe\ORM\DataList;
|
||||||
use SilverStripe\FrameworkTest\Model\TestPage;
|
use SilverStripe\FrameworkTest\Model\TestPage;
|
||||||
|
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
|
||||||
|
use SilverStripe\Forms\GridField\GridField;
|
||||||
|
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
|
||||||
|
use SilverStripe\View\Requirements;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\Form;
|
||||||
|
|
||||||
class GridFieldTestPage extends TestPage
|
class GridFieldTestPage extends TestPage
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
use SilverStripe\FrameworkTest\Model\TestCategory;
|
use SilverStripe\FrameworkTest\Model\TestCategory;
|
||||||
use SilverStripe\FrameworkTest\Model\TestPage;
|
use SilverStripe\FrameworkTest\Model\TestPage;
|
||||||
use SilverStripe\FrameworkTest\Model\TestPage_Controller;
|
use SilverStripe\FrameworkTest\Model\TestPage_Controller;
|
||||||
|
use SilverStripe\Forms\CheckboxSetField;
|
||||||
|
use SilverStripe\Forms\TreeDropdownField;
|
||||||
|
use SilverStripe\Forms\TreeMultiselectField;
|
||||||
|
|
||||||
|
|
||||||
class RelationFieldsTestPage extends TestPage
|
class RelationFieldsTestPage extends TestPage
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,13 @@
|
|||||||
use SilverStripe\FrameworkTest\Model\TestPage;
|
use SilverStripe\FrameworkTest\Model\TestPage;
|
||||||
use SilverStripe\FrameworkTest\Model\TestPage_Controller;
|
use SilverStripe\FrameworkTest\Model\TestPage_Controller;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
|
use SilverStripe\Forms\EmailField;
|
||||||
|
use SilverStripe\Forms\FileField;
|
||||||
|
use SilverStripe\Forms\UploadField;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\FormAction;
|
||||||
|
use SilverStripe\Forms\Form;
|
||||||
|
|
||||||
|
|
||||||
class TestFileUploadPage extends TestPage
|
class TestFileUploadPage extends TestPage
|
||||||
{
|
{
|
||||||
|
@ -6,13 +6,19 @@ use Page;
|
|||||||
|
|
||||||
|
|
||||||
use Page_Controller;
|
use Page_Controller;
|
||||||
use FieldList;
|
|
||||||
use FormAction;
|
|
||||||
use Form;
|
|
||||||
use TextField;
|
|
||||||
use Email;
|
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
|
use SilverStripe\Forms\FormAction;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\Form;
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
|
use SilverStripe\Control\Email\Email;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
|
||||||
|
|
||||||
class Page2MultiForm extends MultiForm
|
class Page2MultiForm extends MultiForm
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
|
use SilverStripe\Forms\LiteralField;
|
||||||
|
use SilverStripe\Forms\CheckboxField;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
|
|
||||||
|
|
||||||
class Page3MultiForm extends MultiForm
|
class Page3MultiForm extends MultiForm
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\LiteralField;
|
||||||
|
use SilverStripe\Control\Session;
|
||||||
|
use SilverStripe\Control\Director;
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
class TestMultiForm extends MultiForm
|
class TestMultiForm extends MultiForm
|
||||||
{
|
{
|
||||||
public static $start_step = 'TestMultiFormStepOne';
|
public static $start_step = 'TestMultiFormStepOne';
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use SilverStripe\Forms\TextField;
|
||||||
|
use SilverStripe\Forms\FieldList;
|
||||||
|
use SilverStripe\Forms\LiteralField;
|
||||||
|
use SilverStripe\Forms\FormAction;
|
||||||
|
use SilverStripe\Forms\RequiredFields;
|
||||||
|
use SilverStripe\Forms\Form;
|
||||||
|
use SilverStripe\Control\Director;
|
||||||
class RecaptchaTestPage extends Page
|
class RecaptchaTestPage extends Page
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
use SilverStripe\Forms\LiteralField;
|
||||||
|
|
||||||
class SifrPage extends Page
|
class SifrPage extends Page
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user