mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
Merge pull request #8 from mateusz/php53
Fix syntax to work with php 5.3, in line with required dependency.
This commit is contained in:
commit
1f67061901
@ -67,10 +67,11 @@ class TestSessionController extends Controller {
|
||||
);
|
||||
if($databaseTemplates) {
|
||||
$fields->push(
|
||||
(new DropdownField('createDatabaseTemplate', false))
|
||||
->setSource($databaseTemplates)
|
||||
->setEmptyString('Empty database')
|
||||
$dropdown = new DropdownField('createDatabaseTemplate', false)
|
||||
);
|
||||
|
||||
$dropdown->setSource($databaseTemplates)
|
||||
->setEmptyString('Empty database');
|
||||
}
|
||||
$fields->merge($this->getBaseFields());
|
||||
$form = new Form(
|
||||
@ -111,11 +112,11 @@ class TestSessionController extends Controller {
|
||||
|
||||
protected function getBaseFields() {
|
||||
$fields = new FieldList(
|
||||
(new TextField('fixture', 'Fixture YAML file path'))
|
||||
->setAttribute('placeholder', 'Example: framework/tests/security/MemberTest.yml'),
|
||||
$textfield = new TextField('fixture', 'Fixture YAML file path'),
|
||||
$datetimeField = new DatetimeField('datetime', 'Custom date'),
|
||||
new HiddenField('flush', null, 1)
|
||||
);
|
||||
$textfield->setAttribute('placeholder', 'Example: framework/tests/security/MemberTest.yml');
|
||||
$datetimeField->getDateField()
|
||||
->setConfig('dateformat', 'yyyy-MM-dd')
|
||||
->setConfig('showcalendar', true)
|
||||
@ -390,4 +391,4 @@ class TestSessionController extends Controller {
|
||||
return $templates;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user